summaryrefslogtreecommitdiffstats
path: root/sys/tools
Commit message (Collapse)AuthorAgeFilesLines
* MFC r318860:hselasky2017-05-281-2/+5
| | | | | Declare the "snd_fxdiv_table" once. This shaves around 24Kbytes of binary data from sound.ko and the kernel.
* MFC r318820:hselasky2017-05-271-3/+3
| | | | | | | | | Increase the allowed maximum number of audio channels from 31 to 127 in the PCM feeder mixer. Without this change a value of 32 channels is treated like zero, due to using a mask of 0x1f, causing a kernel assert when trying to playback bitperfect 32-channel audio. Also update the AWK script which is generating the division tables to handle more than 18 channels. This commit complements r282650.
* MFC r288336: save some bytes by using more concise SDT_PROBE<n>avg2015-10-231-2/+2
|
* MFC r262626, r262626, r264979, r265154, r265162, r265163, r267319, r270863,ian2014-10-271-3/+16
| | | | | | | | | | | | | | | | | r270991, r271045: Enhancements related to compiling FDT data... - Use proper include path for dtc as well as cpp. - Call cpp with -P to avoid printing line markings. - Allow FDT_DTS_FILE to be a list, either in the makedtb target, or in a kernel config file. - Add the dts include directory to the -I list when doing arm builds. - Invoke make_dtb with MACHINE defined for cross building friendliness. - Allow the make_dtb script to work outside of a "make buildkernel" context by setting MACHINE from uname -m if it's not set already. - Use sh -c '...' to launch the dtb build scripts with env prepended, otherwise it tries to treat the env var stuff as a script file name.
* MFC 262614, 262625, 262626, 262627, 262682, 262714, 262725, 262736ian2014-05-161-0/+11
| | | | | | | | | | | | | | | | | | | | | Integrate device-tree upstream files into the build process: (1) Invoke cpp to bring in files via #include (although the old /include/ stuff is supported still). (2) bring in files from either vendor tree or freebsd-custom files when building. (3) move all dts* files from sys/boot/fdt/dts to sys/boot/fdt/dts/${MACHINE} as appropriate. (4) encode all the magic to do the build in sys/tools/fdt/make_dtb.sh so that the different places in the tree use the exact same logic. (5) switch back to gpl dtc by default. the bsdl one in the tree has significant issues not easily addressed by those unfamiliar with the code. Only try to build the static dtb when we're building a static dtb. Use proper include path for dtc as well as cpp. Fix syntax errors (missing ; other minor glitches) in existing dts files.
* MFC r263289: Update NetBSD Foundation copyrights to 2-clause BSDemaste2014-03-242-14/+0
| | | | | | | | | | | The NetBSD Foundation states "Third parties are encouraged to change the license on any files which have a 4-clause license contributed to the NetBSD Foundation to a 2-clause license." This change removes clauses 3 and 4 from copyright / license blocks that list The NetBSD Foundation as the only copyright holder. Sponsored by: The FreeBSD Foundation
* MFC r258622: dtrace sdt: remove the ugly sname parameter of SDT_PROBE_DEFINEavg2014-01-171-2/+2
|
* Further refine the handling of stop signals in the NFS client. Thejhb2013-02-211-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | changes in r246417 were incomplete as they did not add explicit calls to sigdeferstop() around all the places that previously passed SBDRY to _sleep(). In addition, nfs_getcacheblk() could trigger a write RPC from getblk() resulting in sigdeferstop() recursing. Rather than manually deferring stop signals in specific places, change the VFS_*() and VOP_*() methods to defer stop signals for filesystems which request this behavior via a new VFCF_SBDRY flag. Note that this has to be a VFC flag rather than a MNTK flag so that it works properly with VFS_MOUNT() when the mount is not yet fully constructed. For now, only the NFS clients are set this new flag in VFS_SET(). A few other related changes: - Add an assertion to ensure that TDF_SBDRY doesn't leak to userland. - When a lookup request uses VOP_READLINK() to follow a symlink, mark the request as being on behalf of the thread performing the lookup (cnp_thread) rather than using a NULL thread pointer. This causes NFS to properly handle signals during this VOP on an interruptible mount. PR: kern/176179 Reported by: Russell Cattelan (sigdeferstop() recursion) Reviewed by: kib MFC after: 1 month
* Fix build on ARM (and probably other platforms)gonzo2012-12-281-1/+1
|
* - Add new machine parsable KTR macros for timing events.jeff2012-12-191-20/+7
| | | | | | | - Use this new format to automatically handle syscalls and VOPs. This changes the earlier format but is still human readable. Sponsored by: EMC / Isilon Storage Division
* Revert previous commit...kevlo2012-10-101-1/+1
| | | | Pointyhat to: kevlo (myself)
* Prefer NULL over 0 for pointerskevlo2012-10-091-1/+1
|
* Make vnode_if.awk parse vnode operations with underscores, like VOP_FOO_BAR.trociny2012-02-211-1/+1
| | | | | Reviewed by: kib MFC after: 1 week
* Restore the comment that I removed by accident.ed2011-11-091-0/+1
| | | | The comment still applies to this block of code.
* Simplify the code emitted by makeobjops.awk slightly.ed2011-11-091-6/+1
| | | | | | Just place the default kobj_method inside the kobjop_desc structure. There's no need to give these kobj_methods their own symbol. This shaves off 10 KB of a GENERIC kernel binary.
* Make kobj_methods constant.ed2011-11-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | These structures hold no information that is modified during runtime. By marking this constant, we see approximately 600 symbols become read-only (amd64 GENERIC). While there, also mark the kobj_method structures generated by makeobjops.awk static. They are only referenced by the kobjop_desc structures within the same file. Before: $ ls -l kernel -rwxr-xr-x 1 ed wheel 15937309 Nov 8 16:29 kernel* $ size kernel text data bss dec hex filename 12260854 1358468 2848832 16468154 fb48ba kernel $ nm kernel | fgrep -c ' r ' 8240 After: $ ls -l kernel -rwxr-xr-x 1 ed wheel 15922469 Nov 8 16:25 kernel* $ size kernel text data bss dec hex filename 12302869 1302660 2848704 16454233 fb1259 kernel $ nm kernel | fgrep -c ' r ' 8838
* GNU awk does not output escaped newlines in multi-line printc statements. Thisrstone2011-03-311-8/+8
| | | | | | | | | | | | | | | leads to compile errors when trying to compile firmware(9) stubs created with gawk, as multiple #include statements end up on the same line. Replace the multi-line printc statement that outputs all of the #includes with one printc per #include. This allows modules compatible with firmware(9) to be cross-built from a Linux machine without requiring the one true awk to be installed. I've intentionally done the minimal set of changes necessary to make gawk produce valid (but not pretty) C code, to reduce the churn and keep fw_stubs.awk as readable as possible. Approved by: emaste (mentor) MFC after: 2 weeks
* Add an extra comment to the SDT probes definition. This allows us to getrpaulo2010-08-221-2/+2
| | | | | | | | | use '-' in probe names, matching the probe names in Solaris.[1] Add userland SDT probes definitions to sys/sdt.h. Sponsored by: The FreeBSD Foundation Discussed with: rwaston [1]
* Flattened Device Tree helper scripts.raj2010-06-022-0/+52
| | | | | Reviewed by: imp Sponsored by: The FreeBSD Foundation
* Output a comment on top of each generated file explaining where it camerpaulo2009-10-251-1/+5
| | | | from.
* Rename default to default_function, for compatibility with GNU awk.emaste2009-10-221-7/+7
| | | | (For cross-compiling out-of-tree kernel modules, for example.)
* Allow KMOD with hypens and dots.fjoe2009-10-201-7/+9
| | | | MFC after: 1 week
* - Increase dynamic range of filter coefficients from 28bit to 30bit.ariff2009-07-051-3/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This cause dramatic effect in overall precision and conversion quality by pushing down most aliasing artifacts around -180 dB. Spectrogram analysis/comparison: http://people.freebsd.org/~ariff/z_comparison/z_28vs30/ - Guard against possible 64bit overflow during accumulation process by slightly normalize and saturate sample and coefficient multiplication, possible during extreme 32bit downsampling (eg. 380KHz -> 8KHz) with custom preset that require more than ~7000 taps filter (which is overkill). - Add knobs through FEEDER_RATE_PRESETS to set dynamic range of filter coefficients/accumulator and prefered polynomial interpolator: COEFFICIENT_BIT:X (where 1 <= X <= 30, default: 30) ACCUMULATOR_BIT:X (where 32 <= X <=64, default: 58) INTERPOLATOR:I (where I = ZOH, LINEAR, QUADRATIC, HERMITE, BSPLINE, OPT32X, OPT16X, OPT8X, OPT4X, OPT2X) Approved by: re (kib)
* Slightly increase amount of bandwidth of resampling filter forariff2009-07-021-1/+1
| | | | | | | | | | | | | | | feeder_rate_quality=3. This have the benefit of reducing aliasing artifacts due to alias masking. Spectrogram analysis: o Old preset (100:36:0.90) http://people.freebsd.org/~ariff/z_comparison/z_q3_old.png o New preset (100:36:0.92): http://people.freebsd.org/~ariff/z_comparison/z_q3_new.png Approved by: re (kib)
* - Add a way to change filter oversampling factor throughariff2009-06-151-14/+39
| | | | | | | | | | | | | FEEDER_RATE_PRESET "OVERSAMPLING_FACTOR:X .. .." where X = log2(oversampling factor). - Lower down default filter oversampling factor from 128 (log2 = 7) to 32 (log2 = 5), saving worth of 80 Kb. The use of better polynomial interpolator will raise its conversion quality/accuracy to match (or slightly better) with previous settings. - Bump driver version.
* Move all sound related scripts to its own 'sound' subdir.ariff2009-06-104-0/+0
| | | | Suggested by: jmallett
* Sound Mega-commit. Expect further cleanup until code freeze.ariff2009-06-073-0/+1376
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For a slightly thorough explaination, please refer to [1] http://people.freebsd.org/~ariff/SOUND_4.TXT.html . Summary of changes includes: 1 Volume Per-Channel (vpc). Provides private / standalone volume control unique per-stream pcm channel without touching master volume / pcm. Applications can directly use SNDCTL_DSP_[GET|SET][PLAY|REC]VOL, or for backwards compatibility, SOUND_MIXER_PCM through the opened dsp device instead of /dev/mixer. Special "bypass" mode is enabled through /dev/mixer which will automatically detect if the adjustment is made through /dev/mixer and forward its request to this private volume controller. Changes to this volume object will not interfere with other channels. Requirements: - SNDCTL_DSP_[GET|SET][PLAY|REC]_VOL are newer ioctls (OSSv4) which require specific application modifications (preferred). - No modifications required for using bypass mode, so applications like mplayer or xmms should work out of the box. Kernel hints: - hint.pcm.%d.vpc (0 = disable vpc). Kernel sysctls: - hw.snd.vpc_mixer_bypass (default: 1). Enable or disable /dev/mixer bypass mode. - hw.snd.vpc_autoreset (default: 1). By default, closing/opening /dev/dsp will reset the volume back to 0 db gain/attenuation. Setting this to 0 will preserve its settings across device closing/opening. - hw.snd.vpc_reset (default: 0). Panic/reset button to reset all volume settings back to 0 db. - hw.snd.vpc_0db (default: 45). 0 db relative to linear mixer value. 2 High quality fixed-point Bandlimited SINC sampling rate converter, based on Julius O'Smith's Digital Audio Resampling - http://ccrma.stanford.edu/~jos/resample/. It includes a filter design script written in awk (the clumsiest joke I've ever written) - 100% 32bit fixed-point, 64bit accumulator. - Possibly among the fastest (if not fastest) of its kind. - Resampling quality is tunable, either runtime or during kernel compilation (FEEDER_RATE_PRESETS). - Quality can be further customized during kernel compilation by defining FEEDER_RATE_PRESETS in /etc/make.conf. Kernel sysctls: - hw.snd.feeder_rate_quality. 0 - Zero-order Hold (ZOH). Fastest, bad quality. 1 - Linear Interpolation (LINEAR). Slightly slower than ZOH, better quality but still does not eliminate aliasing. 2 - (and above) - Sinc Interpolation(SINC). Best quality. SINC quality always start from 2 and above. Rough quality comparisons: - http://people.freebsd.org/~ariff/z_comparison/ 3 Bit-perfect mode. Bypasses all feeder/dsp effects. Pure sound will be directly fed into the hardware. 4 Parametric (compile time) Software Equalizer (Bass/Treble mixer). Can be customized by defining FEEDER_EQ_PRESETS in /etc/make.conf. 5 Transparent/Adaptive Virtual Channel. Now you don't have to disable vchans in order to make digital format pass through. It also makes vchans more dynamic by choosing a better format/rate among all the concurrent streams, which means that dev.pcm.X.play.vchanformat/rate becomes sort of optional. 6 Exclusive Stream, with special open() mode O_EXCL. This will "mute" other concurrent vchan streams and only allow a single channel with O_EXCL set to keep producing sound. Other Changes: * most feeder_* stuffs are compilable in userland. Let's not speculate whether we should go all out for it (save that for FreeBSD 16.0-RELEASE). * kobj signature fixups, thanks to Andriy Gapon <avg@freebsd.org> * pull out channel mixing logic out of vchan.c and create its own feeder_mixer for world justice. * various refactoring here and there, for good or bad. * activation of few more OSSv4 ioctls() (see [1] above). * opt_snd.h for possible compile time configuration: (mostly for debugging purposes, don't try these at home) SND_DEBUG SND_DIAGNOSTIC SND_FEEDER_MULTIFORMAT SND_FEEDER_FULL_MULTIFORMAT SND_FEEDER_RATE_HP SND_PCM_64 SND_OLDSTEREO Manual page updates are on the way. Tested by: joel, Olivier SMEDTS <olivier at gid0 d org>, too many unsung / unnamed heroes.
* Add SDT DTrace probes for VFS vnode operations in the vfs:voprwatson2009-03-291-0/+12
| | | | | | | | | | | | provider namespace. These are inserted dynamically into the VOP_..._AP() functions created from vnode_if.src. Each VOP has entry and return probes, as arg0 the primary vnode, arg1 the vnode operation argument structure pointer, providing access to IN and OUT arguments, and for return probes, arg2 the return value. MFC after: 1 month Sponsored by: Google, Inc.
* Remove some unused and broken code that attempted to not invoke lockingjhb2008-11-031-6/+0
| | | | | asserts on NULL vnode pointers. All the vnode assertion routines already check for NULL vnode pointers.
* Introduce a standalone shell script for embedding MFS image.raj2008-02-051-0/+39
| | | | | | | | | This allows to fix a problem with ARM kernel.bin not having the MFS image embedded: it is objcopied from the kernel.noheader temporary ELF file, which was not subject to embedding the MFS image previously. Reviewed by: imp Approved by: cognet (mentor)
* Catch up with ACPI-CA 20070320 import.jkim2007-03-221-5/+5
|
* - Add Intel firmwares for Intel PRO/Wireless LAN 2100/2200/2915 cards in aflz2007-03-021-4/+30
| | | | | | | | | | | | | uuencoded format along with their respective LICENSE files. - Add new share/doc/legal directory to BSD.usr.dist mtree file. This is the place we install LICENSE files for restricted firmwares. - Teach firmware(9) and kmod.mk about licensed firmwares. Restricted firmwares won't load properly unless legal.<name>.license_ack is set to 1, either via kenv(1) or /boot/loader.conf. Reviewed by: mlaier, sam Permitted by: Intel (via Andrew Wilson) MFC after: 1 month
* Fix obvious typo (use long name if short name isn't provided).flz2007-02-271-1/+1
| | | | | Reviewed by: sam MFC after: 3 days
* Cleanup and document the implementation of firmware(9) based onluigi2007-02-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a version that i posted earlier on the -current mailing list, and subsequent feedback received. The core of the change is just in sys/firmware.h and kern/subr_firmware.c, while other files are just adaptation of the clients to the ABI change (const-ification of some parameters and hiding of internal info, so this is fully compatible at the binary level). In detail: - reduce the amount of information exported to clients in struct firmware, and constify the pointer; - internally, document and simplify the implementation of the various functions, and make sure error conditions are dealt with properly. The diffs are large, but the code is really straightforward now (i hope). Note also that there is a subtle issue with the implementation of firmware_register(): currently, as in the previous version, we just store a reference to the 'imagename' argument, but we should rather copy it because there is no guarantee that this is a static string. I realised this while testing this code, but i prefer to fix it in a later commit -- there is no regression with respect to the past. Note, too, that the version in RELENG_6 has various bugs including missing locks around the module release calls, mishandling of modules loaded by /boot/loader, and so on, so an MFC is absolutely necessary there. I was just postponing it until this cleanup to avoid doing things twice. MFC after: 1 week
* Check for errors when registering and unregistering firmware modules. Thisjhb2006-06-161-12/+25
| | | | | | | | | prevents the unfortunate situation whereby one might kldload a firmware module by hand and later kldunload it while a driver still has an open reference to it. MFC after: 1 week Glanced at by: iedowse
* - Add two checks for syntax errorsdds2006-05-301-7/+13
| | | | | - Improve error reporting - Remove redundant conditionals
* Assertion code specifications are introduced using special characterdds2006-05-301-5/+5
| | | | | sequences that are distinct from comments. %% is used for argument locks; %! for pre- and post-conditions.
* Update usage comment to match reality.dds2006-05-261-1/+2
|
* Fix a leftover "iwi_boot" string.mlaier2006-01-301-1/+1
| | | | Submitted by: gallatin
* firmware(9) is a subsystem to load binary data into the kernel via amlaier2006-01-291-0/+189
| | | | | | | | | | specially crafted module. There are several handrolled sollutions to this problem in the tree already which will be replaced with this. They include iwi(4), ipw(4), ispfw(4) and digi(4). No objection from: arch MFC after: 2 weeks X-MFC after: some drivers have been converted
* Eradicate caddr_t from the VFS API.des2005-12-141-2/+2
|
* Nuke vnodeop_desc.vdesc_transports, which has been unused since the dawndes2005-12-141-2/+1
| | | | of time (or the inception of ncvs, whichever came last)
* Add convenience macros for bus_space usage that doesn't require specificationphk2005-09-241-0/+68
| | | | | | | | | | | | of bus tag+handle. Instead of bus_space_write_1(sc->tag, sc->handle, ...) this macros offer bus_write_1(sc->resource, ...) The name+argument transformation is constant and the the macros are generated (by hand) by the script in tools/bus_macro.sh.
* Allow EVFILT_VNODE events to work on every filesystem type, not justssouhlal2005-06-091-9/+6
| | | | | | | | | | | | | | | UFS by: - Making the pre and post hooks for the VOP functions work even when DEBUG_VFS_LOCKS is not defined. - Moving the KNOTE activations into the corresponding VOP hooks. - Creating a MNTK_NOKNOTE flag for the mnt_kern_flag field of struct mount that permits filesystems to disable the new behavior. - Creating a default VOP_KQFILTER function: vfs_kqfilter() My benchmarks have not revealed any performance degradation. Reviewed by: jeff, bde Approved by: rwatson, jmg (kqueue changes), grehan (mentor)
* - Add the character "E" to the understood lock types. This meansjeff2005-04-111-0/+2
| | | | | | the VOP requires an exclusive lock. Sponsored by: Isilon Systems, Inc.
* Add VOP_FOO_APV() which takes a pointer to the vop_vector.phk2005-02-081-6/+11
| | | | | | | This allows stacked or partitioned filesystems to say "Continue the normal resolution from here", for instace from FFS to UFS. Use VNASSERT() instead of KASSERT().
* Get rid of the VDESC() macro while the pot is boiling anyway, it isphk2005-01-131-2/+2
| | | | | only used from generate files now, so we might as well generate the right stuff from the start.
* Change the generated VOP_ macro implementations to improve type checkingphk2005-01-131-48/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and KASSERT coverage. After this check there is only one "nasty" cast in this code but there is a KASSERT to protect against the wrong argument structure behind that cast. Un-inlining the meat of VOP_FOO() saves 35kB of text segment on a typical kernel with no change in performance. We also now run the checking and tracing on VOP's which have been layered by nullfs, umapfs, deadfs or unionfs. Add new (non-inline) VOP_FOO_AP() functions which take a "struct foo_args" argument and does everything the VOP_FOO() macros used to do with checks and debugging code. Add KASSERT to VOP_FOO_AP() check for argument type being correct. Slim down VOP_FOO() inline functions to just stuff arguments into the struct foo_args and call VOP_FOO_AP(). Put function pointer to VOP_FOO_AP() into vop_foo_desc structure and make VCALL() use it instead of the current offsetoff() hack. Retire vcall() which implemented the offsetoff() Make deadfs and unionfs use VOP_FOO_AP() calls instead of VCALL(), we know which specific call we want already. Remove unneeded arguments to VCALL() in nullfs and umapfs bypass functions. Remove unused vdesc_offset and VOFFSET(). Generally improve style/readability of the generated code.
* /* -> /*- for license, minor formatting changesimp2005-01-076-5/+11
|
* dheader and hheader were the same function, really, so rename one ofimp2004-12-311-35/+13
| | | | them to header, kill the other and use both with a different arg...
OpenPOWER on IntegriCloud