Index: head/lib/msun/man/fma.3 =================================================================== --- head/lib/msun/man/fma.3 (revision 152754) +++ head/lib/msun/man/fma.3 (revision 152755) @@ -1,116 +1,116 @@ .\" Copyright (c) 2005 David Schultz .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that 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 22, 2005 .Dt FMA 3 .Os .Sh NAME .Nm fma , .Nm fmaf , .Nm fmal .Nd fused multiply-add .Sh LIBRARY .Lb libm .Sh SYNOPSIS .In math.h .Ft double .Fn fma "double x" "double y" "double z" .Ft float .Fn fmaf "float x" "float y" "float z" .Ft long double .Fn fmal "long double x" "long double y" "long double z" .Sh DESCRIPTION The .Fn fma , .Fn fmaf , and .Fn fmal functions return .No "(x * y) + z" , computed with only one rounding error. Using the ordinary multiplication and addition operators, by contrast, results in two roundings: one for the intermediate product and one for the final result. .Pp For instance, the expression .No "1.2e100 * 2.0e208 - 1.4e308" produces \*(If due to overflow in the intermediate product, whereas .No "fma(1.2e100, 2.0e208, -1.4e308)" returns approximately 1.0e308. .Pp The fused multiply-add operation is often used to improve the accuracy of calculations such as dot products. It may also be used to improve performance on machines that implement it natively. The macros .Dv FP_FAST_FMA , .Dv FP_FAST_FMAF and .Dv FP_FAST_FMAL may be defined in .In math.h to indicate that .Fn fma , .Fn fmaf , and .Fn fmal (respectively) have comparable or faster speed than a multiply operation followed by an add operation. .Sh IMPLEMENTATION NOTES In general, these routines will behave as one would expect if .No "x * y + z" were computed with unbounded precision and range, then rounded to the precision of the return type. However, on some platforms, if .Fa z is \*(Na, these functions may not raise an exception even when the computation of .No "x * y" would have otherwise generated an invalid exception. .Sh SEE ALSO .Xr fenv 3 , .Xr math 3 .Sh STANDARDS The .Fn fma , .Fn fmaf , and .Fn fmal functions conform to .St -isoC-99 . A fused multiply-add operation with virtually identical characteristics appears in IEEE draft standard 754R. .Sh HISTORY The .Fn fma and .Fn fmaf routines first appeared in .Fx 5.4 , and .Fn fmal appeared in -.Fx 5.5 . +.Fx 6.0 . Index: head/lib/msun/man/remainder.3 =================================================================== --- head/lib/msun/man/remainder.3 (revision 152754) +++ head/lib/msun/man/remainder.3 (revision 152755) @@ -1,146 +1,146 @@ .\" Copyright (c) 1985, 1991 Regents of the University of California. .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by the University of .\" California, Berkeley and its contributors. .\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" from: @(#)ieee.3 6.4 (Berkeley) 5/6/91 .\" $FreeBSD$ .\" .Dd March 24, 2005 .Dt REMAINDER 3 .Os .Sh NAME .Nm remainder , .Nm remainderf , .Nm remquo , .Nm remquof .Nd minimal residue functions .Sh LIBRARY .Lb libm .Sh SYNOPSIS .In math.h .Ft double .Fn remainder "double x" "double y" .Ft float .Fn remainderf "float x" "float y" .Ft double .Fn remquo "double x" "double y" "int *quo" .Ft float .Fn remquof "float x" "float y" "int *quo" .Sh DESCRIPTION .Fn remainder , .Fn remainderf , .Fn remquo , and .Fn remquof return the remainder .Fa r := .Fa x \- .Fa n\(**y where .Fa n is the integer nearest the exact value of .Bk -words .Fa x Ns / Ns Fa y ; .Ek moreover if .Pf \\*(Ba Fa n \- .Sm off .Fa x No / Fa y No \\*(Ba .Sm on = 1/2 then .Fa n is even. Consequently the remainder is computed exactly and .Sm off .Pf \\*(Ba Fa r No \\*(Ba .Sm on \*(Le .Sm off .Pf \\*(Ba Fa y No \\*(Ba/2 . .Sm on But attempting to take the remainder when .Fa y is 0 or .Fa x is \*(Pm\*(If is an invalid operation that produces a \*(Na. .Pp The .Fn remquo and .Fn remquof functions also store the last .Va k bits of .Fa n in the location pointed to by .Fa quo , provided that .Fa n exists. The number of bits .Va k is platform-specific, but is guaranteed to be at least 3. .Sh SEE ALSO .Xr fmod 3 , .Xr ieee 3 , .Xr math 3 .Sh STANDARDS The .Fn remainder , .Fn remainderf , .Fn remquo , and .Fn remquof routines conform to .St -isoC-99 . The remainder is as defined in .St -ieee754 . .Sh HISTORY The .Fn remainder and .Fn remainderf functions appeared in .Bx 4.3 and .Fx 2.0 , respectively. The .Fn remquo and .Fn remquof functions were added in -.Fx 5.5 . +.Fx 6.0 . Index: head/lib/msun/man/scalbn.3 =================================================================== --- head/lib/msun/man/scalbn.3 (revision 152754) +++ head/lib/msun/man/scalbn.3 (revision 152755) @@ -1,95 +1,95 @@ .\" Copyright (c) 1985, 1991 Regents of the University of California. .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by the University of .\" California, Berkeley and its contributors. .\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" from: @(#)ieee.3 6.4 (Berkeley) 5/6/91 .\" $FreeBSD$ .\" .Dd March 4, 2005 .Dt SCALBN 3 .Os .Sh NAME .Nm scalbln , .Nm scalblnf , .Nm scalblnl , .Nm scalbn , .Nm scalbnf , .Nm scalbnl .Nd adjust exponent .Sh LIBRARY .Lb libm .Sh SYNOPSIS .In math.h .Ft double .Fn scalbln "double x" "long n" .Ft float .Fn scalblnf "float x" "long n" .Ft long double .Fn scalblnl "long double x" "long n" .Ft double .Fn scalbn "double x" "int n" .Ft float .Fn scalbnf "float x" "int n" .Ft long double .Fn scalbnl "long double x" "int n" .Sh DESCRIPTION These routines return .Fa x Ns \(**(2** Ns Fa n ) computed by exponent manipulation. .Sh SEE ALSO .Xr ieee 3 , .Xr math 3 .Sh STANDARDS These routines conform to .St -isoC-99 , and they implement the Scalb function recommended by .St -ieee754 . .Sh HISTORY The .Fn scalbn and .Fn scalbnf functions appeared in .Bx 4.3 and .Fx 2.0 , respectively. The .Fn scalbln and .Fn scalblnf functions first appeared in .Fx 5.3 , and .Fn scalblnl and .Fn scalbln in -.Fx 5.5 . +.Fx 6.0 . Index: head/sbin/geom/class/eli/geli.8 =================================================================== --- head/sbin/geom/class/eli/geli.8 (revision 152754) +++ head/sbin/geom/class/eli/geli.8 (revision 152755) @@ -1,527 +1,527 @@ .\" Copyright (c) 2005 Pawel Jakub Dawidek .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that 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$ .\" .Dd April 11, 2005 .Dt GELI 8 .Os .Sh NAME .Nm geli .Nd "control utility for cryptographic GEOM class" .Sh SYNOPSIS To compile GEOM_ELI into your kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset indent .Cd "device crypto" .Cd "options GEOM_ELI" .Ed .Pp Alternately, to load the GEOM_ELI module at boot time, place the following line in your .Xr loader.conf 5 : .Bd -literal -offset indent geom_eli_load="YES" .Ed .Pp Usage of the .Xr geli 8 utility: .Pp .Nm .Cm init .Op Fl bPv .Op Fl a Ar algo .Op Fl i Ar iterations .Op Fl K Ar newkeyfile .Op Fl l Ar keylen .Op Fl s Ar sectorsize .Ar prov .Nm .Cm label - an alias for .Cm init .Nm .Cm attach .Op Fl dpv .Op Fl k Ar keyfile .Ar prov .Nm .Cm detach .Op Fl fl .Ar prov ... .Nm .Cm stop - an alias for .Cm detach .Nm .Cm onetime .Op Fl d .Op Fl a Ar algo .Op Fl l Ar keylen .Op Fl s Ar sectorsize .Ar prov ... .Nm .Cm setkey .Op Fl pPv .Op Fl i Ar iterations .Op Fl k Ar keyfile .Op Fl K Ar newkeyfile .Op Fl n Ar keyno .Ar prov .Nm .Cm delkey .Op Fl afv .Op Fl n Ar keyno .Ar prov .Nm .Cm kill .Op Fl av .Op Ar prov ... .Nm .Cm backup .Op Fl v .Ar prov .Ar file .Nm .Cm restore .Op Fl v .Ar file .Ar prov .Nm .Cm clear .Op Fl v .Ar prov ... .Nm .Cm dump .Op Fl v .Ar prov ... .Nm .Cm list .Nm .Cm status .Nm .Cm load .Nm .Cm unload .Sh DESCRIPTION The .Nm utility is used to configure encryption on GEOM providers. .Pp The following is a list of the most important features: .Pp .Bl -bullet -offset indent -compact .It Utilizes the .Xr crypto 9 framework, so when there is crypto hardware available, .Nm will make use of it automatically. .It Supports many cryptographic algorithms (currently .Nm AES , .Nm Blowfish and .Nm 3DES ) . .It Can create a key from a couple of components (user entered passphrase, random bits from a file, etc.). .It Allows to encrypt the root partition - the user will be asked for the passphrase before the root file system is mounted. .It The passphrase of the user is strengthened with: .Rs .%A B. Kaliski .%T "PKCS #5: Password-Based Cryptography Specification, Version 2.0." .%R RFC .%N 2898 .Re .It Allows to use two independent keys (e.g. .Qq "user key" and .Qq "company key" ) . .It It is fast - .Nm performs simple sector-to-sector encryption. .It Allows to backup/restore Master Keys, so when a user has to quickly destroy his keys, it is possible to get the data back by restoring keys from the backup. .It Providers can be configured to automatically detach on last close (so users don't have to remember to detach providers after unmounting the file systems). .It Allows to attach a provider with a random, one-time key - useful for swap partitions and temporary file systems. .El .Pp The first argument to .Nm indicates an action to be performed: .Bl -tag -width ".Cm onetime" .It Cm init Initialize provider which needs to be encrypted. Here you can set up the cryptographic algorithm to use, key length, etc. The last provider's sector is used to store metadata. .Pp Additional options include: .Bl -tag -width ".Fl a Ar algo" .It Fl a Ar algo Encryption algorithm to use. Currently supported algorithms are: .Nm AES , .Nm Blowfish and .Nm 3DES . The default is .Nm AES . .It Fl b Ask for the passphrase on boot, before the root partition is mounted. This makes it possible to use an encrypted root partition. One will still need bootable unencrypted storage with a .Pa /boot/ directory, which can be a CD-ROM disc or USB pen-drive, that can be removed after boot. .It Fl i Ar iterations Number of iterations to use with PKCS#5v2. If this option is not specified, .Nm will find the number of iterations which is equal to 2 seconds of crypto work. If 0 is given, PKCS#5v2 will not be used. .It Fl K Ar newkeyfile Specifies a file which contains part of the key. If .Ar newkeyfile is given as -, standard input will be used. Here is how more than one file with a key component can be used: .Bd -literal -offset indent # cat key1 key2 key3 | geli init -K - /dev/da0 .Ed .It Fl l Ar keylen Key length to use with the given cryptographic algorithm. If not given, the default key length for the given algorithm is used, which is: 128 for .Nm AES , 128 for .Nm Blowfish and 192 for .Nm 3DES . .It Fl s Ar sectorsize Change decrypted provider's sector size. Increasing sector size allows to increase performance, because we need to generate an IV and do encrypt/decrypt for every single sector - less number of sectors means less work to do. .It Fl P Do not use passphrase as the key component. .El .It Cm attach Attach the given provider. The master key will be decrypted using the given passphrase/keyfile and a new GEOM provider will be created using the given provider's name with an .Qq .eli suffix. .Pp Additional options include: .Bl -tag -width ".Fl a Ar algo" .It Fl d If specified, a decrypted provider will be detached automatically on last close. This can help with short memory - user doesn't have to remember to detach the provider after unmounting the file system. It only works when the provider was opened for writing, so it will not work if the file system on the provider is mounted read-only. Probably a better choice is the .Fl l option for the .Cm detach subcommand. .It Fl k Ar keyfile Specifies a file which contains part of the key. For more information see the description of the .Fl K option for the .Cm init subcommand. .It Fl p Do not use passphrase as the key component. .El .It Cm detach Detach the given providers, which means remove the devfs entry and clear the keys from memory. .Pp Additional options include: .Bl -tag -width ".Fl a Ar algo" .It Fl f Force detach - detach even if the provider is open. .It Fl l Mark provider to detach on last close. If this option is specified, the provider will not be detached until it is open, but when it will be closed last time, it will be automatically detached (even if it was only opened for reading). .El .It Cm onetime Attach the given providers with random, one-time keys. The command can be used to encrypt swap partitions or temporary file systems. .Pp Additional options include: .Bl -tag -width ".Fl a Ar algo" .It Fl a Ar algo Encryption algorithm to use. For more information, see the description of the .Cm init subcommand. .It Fl d Detach on last close. Note, the option is not usable for temporary file systems as the provider will be detached after creating the file system on it. It still can (and should be) used for swap partitions. For more information, see the description of the .Cm attach subcommand. .It Fl l Ar keylen Key length to use with the given cryptographic algorithm. For more information, see the description of the .Cm init subcommand. .It Fl s Ar sectorsize Change decrypted provider's sector size. For more information, see the description of the .Cm init subcommand. .El .It Cm setkey Change or setup (if not yet initialized) selected key. There is one master key, which can be encrypted with two independent user keys. With the .Cm init subcommand, only key number 0 is initialized. The key can always be changed: for an attached provider, for a detached provider or on the backup file. When a provider is attached, the user does not have to provide an old passphrase/keyfile. .Pp Additional options include: .Bl -tag -width ".Fl a Ar algo" .It Fl i Ar iterations Number of iterations to use with PKCS#5v2. If 0 is given, PKCS#5v2 will not be used. To be able to use this option with .Cm setkey subcommand, only one key have to be defined and this key has to be changed. .It Fl k Ar keyfile Specifies a file which contains part of the old key. .It Fl K Ar newkeyfile Specifies a file which contains part of the new key. .It Fl n Ar keyno Specifies the number of the key to change (could be 0 or 1). If the provider is attached and no key number is given, the key used for attaching the provider will be changed. If the provider is detached (or we are operating on a backup file) and no key number is given, the key decrypted with the passphrase/keyfile will be changed. .It Fl p Do not use passphrase as the old key component. .It Fl P Do not use passphrase as the new key component. .El .It Cm delkey Destroy (overwrite with random data) the selected key. If one is destroying keys for an attached provider, the provider will not be detached even if all keys will be destroyed. It can be even rescued with the .Cm setkey subcommand. .Bl -tag -width ".Fl a Ar algo" .It Fl a Destroy all keys (does not need .Fl f option). .It Fl f Force key destruction. This option is needed to destroy the last key. .It Fl n Ar keyno Specifies the key number. If the provider is attached and no key number is given, the key used for attaching the provider will be destroyed. If provider is detached (or we are operating on a backup file) the key number has to be given. .El .It Cm kill This command should be used in emergency situations. It will destroy all keys on the given provider and will detach it forcibly (if it is attached). This is absolutely a one-way command - if you do not have a metadata backup, your data is gone for good. .Bl -tag -width ".Fl a Ar algo" .It Fl a If specified, all currently attached providers will be killed. .El .It Cm backup Backup metadata from the given provider to the given file. .It Cm restore Restore metadata from the given file to the given provider. .It Cm clear Clear metadata from the given providers. .It Cm dump Dump metadata stored on the given providers. .It Cm list See .Xr geom 8 . .It Cm status See .Xr geom 8 . .It Cm load See .Xr geom 8 . .It Cm unload See .Xr geom 8 . .El .Pp Additional options include: .Bl -tag -width ".Fl v" .It Fl v Be more verbose. .El .Sh SYSCTL VARIABLES The following .Xr sysctl 8 variables can be used to control the behavior of the .Nm ELI GEOM class. The default value is shown next to each variable. .Bl -tag -width indent .It Va kern.geom.eli.debug : No 0 Debug level of the .Nm ELI GEOM class. This can be set to a number between 0 and 3 inclusive. If set to 0, minimal debug information is printed. If set to 3, the maximum amount of debug information is printed. This variable could be set in .Pa /boot/loader.conf . .It Va kern.geom.eli.tries : No 3 Number of times a user is asked for the passphrase. This is only used for providers which should be attached on boot (before the root file system is mounted). If set to 0, attaching providers on boot will be disabled. This variable should be set in .Pa /boot/loader.conf . .It Va kern.geom.eli.overwrites : No 5 Specifies how many times the Master-Key will be overwritten with random values when it is destroyed. After this operation it is filled with zeros. .It Va kern.geom.eli.visible_passphrase : No 0 If set to 1, the passphrase entered on boot (before the root file system is mounted) will be visible. This possibility should be used with caution as the entered passphrase can be logged and exposed via .Xr dmesg 8 . This variable should be set in .Pa /boot/loader.conf . .It Va kern.geom.eli.threads : No 0 Specifies how many kernel threads should be used for doing software cryptography. Its purpose is to increase performance on SMP systems. If hardware acceleration is available, only one thread will be started. If set to 0, CPU-bound thread will be started for every active CPU. This variable could be set in .Pa /boot/loader.conf . .El .Sh EXIT STATUS Exit status is 0 on success, and 1 if the command fails. .Sh EXAMPLES Initialize a provider which is going to be encrypted with a passphrase and random data from a file on the user's pen drive. Use 4kB sector size. Attach the provider, create a file system and mount it. Do the work. Unmount the provider and detach it: .Bd -literal -offset indent # dd if=/dev/random of=/mnt/pendrive/da2.key bs=64 count=1 # geli init -s 4096 -K /mnt/pendrive/da2.key /dev/da2 Enter new passphrase: Reenter new passphrase: # geli attach -k /mnt/pendrive/da2.key /dev/da2 Enter passphrase: # dd if=/dev/random of=/dev/da2.eli bs=1m # newfs /dev/da2.eli # mount /dev/da2.eli /mnt/secret \&... # umount /mnt/secret # geli detach da2.eli .Ed .Pp Create an encrypted provider, but use two keys: one for your girlfriend and one for you (so there will be no tragedy if she forgets her passphrase): .Bd -literal -offset indent # geli init /dev/da2 Enter new passphrase: (enter your passphrase) Reenter new passphrase: # geli setkey -n 1 /dev/da2 Enter passphrase: (enter your passphrase) Enter new passphrase: (let your girlfriend enter her passphrase ...) Reenter new passphrase: (... twice) .Ed .Pp You are the security-person in your company. Create an encrypted provider for use by the user, but remember that users forget their passphrases, so back Master Key up with your own random key: .Bd -literal -offset indent # dd if=/dev/random of=/mnt/pendrive/keys/`hostname` bs=64 count=1 # geli init -P -K /mnt/pendrive/keys/`hostname` /dev/ad0s1e # geli backup /dev/ad0s1e /mnt/pendrive/backups/`hostname` (use key number 0, so the encrypted Master Key by you will be overwritten) # geli setkey -n 0 -k /mnt/pendrive/keys/`hostname` /dev/ad0s1e (allow the user to enter his passphrase) Enter new passphrase: Reenter new passphrase: .Ed .Pp Encrypted swap partition setup: .Bd -literal -offset indent # dd if=/dev/random of=/dev/ad0s1b bs=1m # geli onetime -d -a 3des ad0s1b # swapon /dev/ad0s1b.eli .Ed .Sh SEE ALSO .Xr crypto 4 , .Xr gbde 4 , .Xr geom 4 , .Xr gbde 8 , .Xr geom 8 , .Xr crypto 9 .Sh HISTORY The .Nm utility appeared in -.Fx 5.5 . +.Fx 6.0 . .Sh AUTHORS .An Pawel Jakub Dawidek Aq pjd@FreeBSD.org Index: head/share/man/man4/man4.i386/acpi_ibm.4 =================================================================== --- head/share/man/man4/man4.i386/acpi_ibm.4 (revision 152754) +++ head/share/man/man4/man4.i386/acpi_ibm.4 (revision 152755) @@ -1,427 +1,427 @@ .\" Copyright (c) 2005 Christian Brueffer .\" Copyright (c) 2005 Markus Brueffer .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that 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 23, 2005 .Dt ACPI_IBM 4 i386 .Os .Sh NAME .Nm acpi_ibm .Nd "ACPI extras driver for IBM laptops" .Sh SYNOPSIS .Cd "device acpi_ibm" .Sh DESCRIPTION The .Nm driver provides support for hotkeys and other components of IBM laptops. The main purpose of this driver is to provide an interface, accessible via .Xr sysctl 8 and .Xr devd 8 , through which applications can determine the status of various laptop components. .Pp While the .Xr sysctl 8 interface is enabled automatically after loading the driver, the .Xr devd 8 interface has to be enabled explicitly, as it may alter the default action of certain keys. This is done by setting the .Va events sysctl as described below. Specifying which keys should generate events is done by setting a bitmask, whereas each bit represents one key or key combination. This bitmask, accessible via the .Va eventmask sysctl, is set to .Va availmask by default, a value representing all possible keypress events on the specific ThinkPad model. .Ss Xr devd 8 Ss Events Hotkey events received by .Xr devd 8 provide the following information: .Pp .Bl -tag -width "subsystem" -offset indent -compact .It system .Qq Li ACPI .It subsystem .Qq Li IBM .It type The source of the event in the ACPI namespace. The value depends on the model. .It notify Event code (see below). .El .Pp Depending on the ThinkPad model, event codes may vary. On a ThinkPad T41p these are as follows: .Pp .Bl -tag -width "subsystem" -offset indent -compact .It Li 0x01 Fn + F1 .It Li 0x02 Fn + F2 .It Li 0x03 Fn + F3 (LCD backlight) .It Li 0x04 Fn + F4 (Suspend to RAM) .It Li 0x05 Fn + F5 (Bluetooth) .It Li 0x06 Fn + F6 .It Li 0x07 Fn + F7 (Screen expand) .It Li 0x08 Fn + F8 .It Li 0x09 Fn + F9 .It Li 0x0a Fn + F10 .It Li 0x0b Fn + F11 .It Li 0x0c Fn + F12 (Suspend to disk) .It Li 0x0d Fn + Backspace .It Li 0x0e Fn + Insert .It Li 0x0f Fn + Delete .It Li 0x10 Fn + Home (Brightness up) .It Li 0x11 Fn + End (Brightness down) .It Li 0x12 Fn + PageUp (ThinkLight) .It Li 0x13 Fn + PageDown .It Li 0x14 Fn + Space (Zoom) .It Li 0x15 Volume Up .It Li 0x16 Volume Down .It Li 0x17 Mute .It Li 0x18 Access IBM Button .El .Ss Xr led 4 Ss Interface The .Nm driver provides a .Xr led 4 interface for the Thinklight. The Thinklight can be made to blink by writing .Tn ASCII strings to the .Pa /dev/led/thinklight device. .Sh SYSCTL VARIABLES The following sysctls are currently implemented: .Bl -tag -width indent .It Va dev.acpi_ibm.0.initialmask (read-only) Bitmask of ACPI events before the .Nm driver was loaded. .It Va dev.acpi_ibm.0.availmask (read-only) Bitmask of all supported ACPI events. .It Va dev.acpi_ibm.0.events Enable ACPI events and set the .Va eventmask to .Va availmask . Without the .Nm driver being loaded, only the Fn+F4 button generates an ACPI event. .It Va dev.acpi_ibm.0.eventmask Sets the ACPI events which are reported to .Xr devd 8 . Fn+F3, Fn+F4 and Fn+F12 always generate ACPI events, regardless which value .Va eventmask has. Depending on the ThinkPad model, the meaning of different bits in the .Va eventmask may vary. On a ThinkPad T41p this is a bitwise OR of the following: .Pp .Bl -tag -width indent-two -compact .It Li 1 Fn + F1 .It Li 2 Fn + F2 .It Li 4 Fn + F3 (LCD backlight) .It Li 8 Fn + F4 (Suspend to RAM) .It Li 16 Fn + F5 (Bluetooth) .It Li 32 Fn + F6 .It Li 64 Fn + F7 (Screen expand) .It Li 128 Fn + F8 .It Li 256 Fn + F9 .It Li 512 Fn + F10 .It Li 1024 Fn + F11 .It Li 2048 Fn + F12 (Suspend to disk) .It Li 4096 Fn + Backspace .It Li 8192 Fn + Insert .It Li 16384 Fn + Delete .It Li 32768 Fn + Home (Brightness up) .It Li 65536 Fn + End (Brightness down) .It Li 131072 Fn + PageUp (ThinkLight) .It Li 262144 Fn + PageDown .It Li 524288 Fn + Space (Zoom) .It Li 1048576 Volume Up .It Li 2097152 Volume Down .It Li 4194304 Mute .It Li 8388608 Access IBM Button .El .It Va dev.acpi_ibm.0.hotkey (read-only) Status of several buttons. Every time a button is pressed, the respecting bit is toggled. It is a bitwise OR of the following: .Pp .Bl -tag -width indent-two -compact .It Li 1 Home Button .It Li 2 Search Button .It Li 4 Mail Button .It Li 8 Access IBM Button .It Li 16 Zoom .It Li 32 Wireless LAN Button .It Li 64 Video Button .It Li 128 Hibernate Button .It Li 256 ThinkLight Button .It Li 512 Screen Expand .It Li 1024 Brightness Up/Down Button .It Li 2048 Volume Up/Down/Mute Button .El .It Va dev.acpi_ibm.0.lcd_brightness Current brightness level of the display. .It Va dev.acpi_ibm.0.volume Speaker volume. .It Va dev.acpi_ibm.0.mute Indicates, whether the speakers are muted or not. .It Va dev.acpi_ibm.0.thinklight Indicates, whether the ThinkLight keyboard light is activated or not. .It Va dev.acpi_ibm.0.bluetooth Toggle Bluetooth chip activity. .It Va dev.acpi_ibm.0.wlan (read-only) Indicates whether the WLAN chip is active or not. .It Va dev.acpi_ibm.0.fan (read-only) Indicates whether the fan is on or off. .It Va dev.acpi_ibm.0.fan_speed (read-only) Fan speed in rounds per minute. A few older ThinkPads report the fan speed in levels ranging from 0 (off) to 7 (max). .It Va dev.acpi_ibm.0.thermal (read-only) Shows the readings of up to eight different temperature sensors. Most ThinkPads include six or more temperature sensors but only expose the CPU temperature through .Xr acpi_thermal 4 . Some ThinkPads have the below sensor layout which might vary depending on the specific model: .Pp .Bl -enum -compact .It CPU .It Mini PCI Module .It HDD .It GPU .It Built-in battery .It UltraBay battery .It Built-in battery .It UltraBay battery .El .El .Pp Defaults for these sysctls can be set in .Xr sysctl.conf 5 . .Sh FILES .Bl -tag -width ".Pa /dev/led/thinklight" .It Pa /dev/led/thinklight Thinklight .Xr led 4 device node .El .Sh EXAMPLES The following can be added to .Xr devd.conf 5 in order to pass button events to a .Pa /usr/local/sbin/acpi_oem_exec.sh script: .Bd -literal -offset indent notify 10 { match "system" "ACPI"; match "subsystem" "IBM"; action "/usr/local/sbin/acpi_oem_exec.sh $notify ibm"; }; .Ed .Pp A possible .Pa /usr/local/sbin/acpi_oem_exec.sh script might look like: .Bd -literal -offset indent #!/bin/sh # if [ "$1" = "" -o "$2" = "" ] then echo "usage: $0 notify oem_name" exit 1 fi NOTIFY=`echo $1` LOGGER="logger" CALC="bc" BC_PRECOMMANDS="scale=2" ECHO="echo" CUT="cut" MAX_LCD_BRIGHTNESS=7 MAX_VOLUME=14 OEM=$2 DISPLAY_PIPE=/tmp/acpi_${OEM}_display case ${NOTIFY} in 0x05) LEVEL=`sysctl -n dev.acpi_${OEM}.0.bluetooth` if [ "$LEVEL" = "1" ] then sysctl dev.acpi_${OEM}.0.bluetooth=0 MESSAGE="bluetooth disabled" else sysctl dev.acpi_${OEM}.0.bluetooth=1 MESSAGE="bluetooth enabled" fi 0x10|0x11) LEVEL=`sysctl -n dev.acpi_${OEM}.0.lcd_brightness` PERCENT=`${ECHO} "${BC_PRECOMMANDS} ; \\ ${LEVEL} / ${MAX_LCD_BRIGHTNESS} * 100" |\\ ${CALC} | ${CUT} -d . -f 1` MESSAGE="brightness level ${PERCENT}%" ;; 0x12) LEVEL=`sysctl -n dev.acpi_${OEM}.0.thinklight` if [ "$LEVEL" = "1" ] then MESSAGE="thinklight enabled" else MESSAGE="thinklight disabled" fi ;; 0x15|0x16) LEVEL=`sysctl -n dev.acpi_${OEM}.0.volume` PERCENT=`${ECHO} "${BC_PRECOMMANDS} ; \\ ${LEVEL} / ${MAX_VOLUME} * 100" | \\ ${CALC} | ${CUT} -d . -f 1` MESSAGE="volume level ${PERCENT}%" ;; 0x17) LEVEL=`sysctl -n dev.acpi_${OEM}.0.mute` if [ "$LEVEL" = "1" ] then MESSAGE="volume muted" else MESSAGE="volume unmuted" fi ;; *) ;; esac ${LOGGER} ${MESSAGE} if [ -p ${DISPLAY_PIPE} ] then ${ECHO} ${MESSAGE} >> ${DISPLAY_PIPE} & fi exit 0 .Ed .Sh SEE ALSO .Xr acpi 4 , .Xr sysctl.conf 5 , .Xr devd 8 , .Xr sysctl 8 .Sh HISTORY The .Nm device driver first appeared in -.Fx 5.5 . +.Fx 6.0 . .Sh AUTHORS .An -nosplit The .Nm driver was written by .An Takanori Watanabe Aq takawata@FreeBSD.org and later mostly rewritten by .An Markus Brueffer Aq markus@FreeBSD.org . This manual page was written by .An Christian Brueffer Aq brueffer@FreeBSD.org and .An Markus Brueffer Aq markus@FreeBSD.org . Index: head/share/man/man4/nve.4 =================================================================== --- head/share/man/man4/nve.4 (revision 152754) +++ head/share/man/man4/nve.4 (revision 152755) @@ -1,133 +1,133 @@ .\" Copyright (c) 2003 Quinton Dolan .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that 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: nvnet.4,v 1.1 2003/10/09 16:48:01 q Exp $ .\" .\" $FreeBSD$ .\" .Dd August 9, 2005 .Dt NVE 4 .Os .Sh NAME .Nm nve .Nd "NVIDIA nForce MCP Networking Adapter device driver" .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset indent .Cd "device miibus" .Cd "device nve" .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 if_nve_load="YES" .Ed .Sh DESCRIPTION The .Nm driver provides support for the NVIDIA nForce MCP and nForce2 MCP2 networking adapter that is embedded in the southbridge of most nForce and nForce2 motherboards. .Pp This driver is a reimplementation of the NVIDIA supported Linux .Nm nvnet driver and uses the same closed source API library to access the underlying hardware. There is currently no programming documentation available for this device, and therefore little is known about the internal architecture of the MAC engine itself. .Pp The .Nm driver supports the following media types: .Bl -tag -width ".Cm 10baseT/UTP" .It Cm autoselect Enable autoselection of the media type and options. .It Cm 10baseT/UTP Set 10Mbps operation. .It Cm 100baseTX Set 100Mbps (Fast Ethernet) operation. .El .Pp The .Nm driver supports the following media options: .Bl -tag -width ".Cm 10baseT/UTP" .It Cm full-duplex Set full duplex operation. .El .Pp For more information on configuring this device, see .Xr ifconfig 8 . .Sh HARDWARE The .Nm driver supports the NVIDIA MCP onboard adapters of mainboards with the following chipsets: .Pp .Bl -bullet -compact .It nForce .It nForce2 .It nForce3 .It nForce4 .El .Sh DIAGNOSTICS .Bl -diag .It "nve%d: couldn't map memory" A fatal initialization error has occurred. .It "nve%d: couldn't map interrupt" A fatal initialization error has occurred. .It "nve%d: failed to allocate memory" There are not enough mbufs available for allocation. .It "nve%d: device timeout" The device has stopped responding to the network, or there is a problem with the network connection (cable). .El .Sh SEE ALSO .Xr arp 4 , .Xr miibus 4 , .Xr netintro 4 , .Xr ng_ether 4 , .Xr ifconfig 8 .Sh HISTORY The .Nm driver first appeared in -.Fx 5.5 . +.Fx 6.0 . .Sh AUTHORS .An -nosplit The .Nm driver was written by .An Quinton Dolan Aq q@onthenet.com.au and .An "David E. O'Brien" Aq obrien@FreeBSD.org . Index: head/share/man/man9/alloc_unr.9 =================================================================== --- head/share/man/man9/alloc_unr.9 (revision 152754) +++ head/share/man/man9/alloc_unr.9 (revision 152755) @@ -1,100 +1,100 @@ .\" Copyright (c) 2005 Gleb Smirnoff .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that 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 March 23, 2005 .Dt ALLOC_UNR 9 .Os .Sh NAME .Nm new_unrhdr , .Nm delete_unrhdr , .Nm alloc_unr , .Nm free_unr .Nd "kernel unit number allocator" .Sh SYNOPSIS .In sys/systm.h .Ft "struct unrhdr *" .Fn new_unrhdr "int low" "int high" "struct mtx *mutex" .Ft void .Fn delete_unrhdr "struct unrhdr *uh" .Ft int .Fn alloc_unr "struct unrhdr *uh" .Ft int .Fn alloc_unrl "struct unrhdr *uh" .Ft void .Fn free_unr "struct unrhdr *uh" "u_int item" .Sh DESCRIPTION The kernel unit number allocator is a generic facility, which allows to allocate unit numbers within a specified range. .Bl -tag -width indent .It Fn new_unrhdr low high mutex Initialize a new unit number allocator entity. The .Fa low and .Fa high arguments specify minimum and maximum number of unit numbers. There is no cost associated with the range of unit numbers, so unless the resource really is finite, .Dv INT_MAX can be used. If .Fa mutex is not .Dv NULL , it is used for locking when allocating and freeing units. Otherwise, internal mutex is used. .It Fn delete_unrhdr uh Destroy specified unit number allocator entity. .It Fn alloc_unr uh Return a new unit number. The lowest free number is always allocated. This function does not allocate memory and never sleeps, however it may block on a mutex. If no free unit numbers are left, .Li \-1 is returned. .It Fn alloc_unrl uh Same as .Fn alloc_unr except that mutex is assumed to be already locked and thus is not used. .It Fn free_unr uh Free a previously allocated unit number. This function may require allocating memory, and thus it can sleep. There is no pre-locked variant. .El .Sh CODE REFERENCES The above functions are implemented in .Pa sys/kern/subr_unit.c . .Sh HISTORY Kernel unit number allocator first appeared in -.Fx 5.5 . +.Fx 6.0 . .Sh AUTHORS .An -nosplit Kernel unit number allocator was written by .An Poul-Henning Kamp . This manpage was written by .An Gleb Smirnoff . Index: head/usr.sbin/powerd/powerd.8 =================================================================== --- head/usr.sbin/powerd/powerd.8 (revision 152754) +++ head/usr.sbin/powerd/powerd.8 (revision 152755) @@ -1,138 +1,138 @@ .\" Copyright (c) 2005 Nate Lawson .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that 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 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$ .\" .Dd November 6, 2005 .Dt POWERD 8 .Os .Sh NAME .Nm powerd .Nd "system power control utility" .Sh SYNOPSIS .Nm .Op Fl a Ar mode .Op Fl b Ar mode .Op Fl i Ar percent .Op Fl n Ar mode .Op Fl p Ar ival .Op Fl P Ar pidfile .Op Fl r Ar percent .Op Fl v .Sh DESCRIPTION The .Nm utility monitors the system state and sets various power control options accordingly. It offers three modes (maximum, minimum, and adaptive) that can be individually selected while on AC power or batteries. .Pp Maximum mode chooses the highest performance values. Minimum mode selects the lowest performance values to get the most power savings. Adaptive mode attempts to strike a balance by degrading performance when the system appears idle and increasing it when the system is busy. It offers a good balance between a small performance loss for greatly increased power savings. The default mode is adaptive. .Pp The .Nm utility recognizes the following runtime options: .Bl -tag -width ".Fl r Ar percent" .It Fl a Ar mode Selects the .Ar mode to use while on AC power. .It Fl b Ar mode Selects the .Ar mode to use while on battery power. .It Fl i Ar percent Specifies the CPU idle percent level when adaptive mode should begin to degrade performance to save power. The default is 90% or higher. .It Fl n Ar mode Selects the .Ar mode to use normally when the AC line state is unknown. .It Fl p Ar ival Specifies a different polling interval (in milliseconds) for AC line state and system idle levels. The default is 500 ms. .It Fl P Ar pidfile Specifies an alternative file in which the process ID should be stored. The default is .Pa /var/run/powerd.pid . .It Fl r Ar percent Specifies the CPU idle percent level where adaptive mode should consider the CPU running and increase performance. The default is 65% or lower. .It Fl v Verbose mode. Messages about power changes will be printed to stdout and .Nm will operate in the foreground. .El .Sh SEE ALSO .Xr acpi 4 , .Xr apm 4 , .Xr cpufreq 4 .Sh HISTORY The .Nm utility first appeared in -.Fx 5.5 . +.Fx 6.0 . .Sh AUTHORS .An -nosplit .An Colin Percival first wrote .Nm estctrl , the utility that .Nm is based on. .An Nate Lawson then updated it for .Xr cpufreq 4 , added features, and wrote this manual page. .Sh BUGS The .Nm utility should also power down idle disks and other components besides the CPU. .Pp If .Nm is used with .Pa power_profile , they may override each other. .Pp The .Nm utility should probably use the .Xr devctl 4 interface instead of polling for AC line state.