summaryrefslogtreecommitdiffstats
path: root/usr.sbin
Commit message (Collapse)AuthorAgeFilesLines
* The Data Byte Count (DBC) field of a Physical Region Descriptorgrehan2013-11-261-11/+21
| | | | | | | | | | | | | Table is 22 bits, with the bit 31 being the interrupt-on-completion bit. OpenBSD and UEFI set this bit, resulting in large block i/o lengths being sent to bhyve and coredumping the process. Fix by masking off the relevant 22 bits when using the DBC field as a length. Reviewed by: Zhixiang Yu Discussed with: Tycho Nightingale (tycho.nightingale@pluribusnetworks.com) MFC after: 10.0
* Fix discrepancy between the IOAPIC ID advertised by firmware tables and theneel2013-11-252-3/+3
| | | | | | | actual value read by the guest from the device. The IOAPIC ID is now set to zero in both MPtable/ACPI tables as well as in the ioapic device emulation. Pointed out by: grehan@
* iostat: fix extracting TTY statistics from core.pluknet2013-11-251-6/+6
| | | | MFC after: 1 week
* Sort messages.dteske2013-11-256-29/+29
|
* Add missing newline to printf format string.dteske2013-11-251-2/+2
|
* Add missing `$' before variable name `pgm'. Unnoticed unless runningdteske2013-11-251-1/+1
| | | | parallel concurrent copies of `bsdconfig syscons_ttys'.
* Add HPET device emulation to bhyve.neel2013-11-251-3/+84
| | | | | | | | | | | bhyve supports a single timer block with 8 timers. The timers are all 32-bit and capable of being operated in periodic mode. All timers support interrupt delivery using MSI. Timers 0 and 1 also support legacy interrupt routing. At the moment the timers are not connected to any ioapic pins but that will be addressed in a subsequent commit. This change is based on a patch from Tycho Nightingale (tycho.nightingale@pluribusnetworks.com).
* Replace Sun RPC license with a 3-clause BSD license, with the explicithrs2013-11-259-243/+234
| | | | permission of Sun Microsystems in 2009.
* Do not create pkg.conf, as it is not necessary anymore and packagesite is ↵bapt2013-11-251-24/+0
| | | | | | | deprecated Reported by: glebius MFC after: 3 days
* Add an ioctl to assert and deassert an ioapic pin atomically. This will be usedneel2013-11-234-10/+17
| | | | | | | | | to inject edge triggered legacy interrupts into the guest. Start using the new API in device models that use edge triggered interrupts: viz. the 8254 timer and the LPC/uart device emulation. Submitted by: Tycho Nightingale (tycho.nightingale@pluribusnetworks.com)
* Teach acpidump(8) to display the 'Flags' field in the HPET Description Table.neel2013-11-221-0/+1
| | | | Reviewed by: jhb@
* Improve network device scanning in the netdev module. First, make it use thedteske2013-11-223-35/+173
| | | | | | | | | | `device.subr' framework (improving performane and reducing sub-shells). Next improve the `device.subr' framework itself. Make use of the `flags' device struct member for network interfaces to indicate if an interface is Active, Wired Ethernet, or 802.11 Wireless. Functions have been added to make checks against the `flags' bit-field quick and efficient. Last, add function for rescanning the network to update the device registers. Remove an unnecessary local (ifn) while we're here (use already provided local `if').
* Fix mergemaster -U by forcing FreeBSD 9 compatiblity in mtree when mtree isbrooks2013-11-221-1/+7
| | | | | | | | | | | nmtree. The mtree output used by mergemaster in this case was clearly not meant for computer consumption and an approach based on -f <file1> -f <file2> would probalby be a better idea, but this is a minimal change. MFC after: 3 days X-MFC-with: r258437
* f_die() (see `bsdconfig includes -dF die') uses a dialog box (and has beendteske2013-11-212-4/+6
| | | | | documented as such; I just forgot). These utilities are command-line only and as such should stick to either using f_die without arguments or printf)
* Fix reference to ioctl(2).pluknet2013-11-211-1/+1
|
* Remove unused line -- cruft left over from SVN r258360.dteske2013-11-211-1/+0
|
* Quote the interface name for good measure.dteske2013-11-211-6/+7
|
* Revert SVN r257830 -- that feature was annoying and was removed long ago.dteske2013-11-211-5/+2
| | | | Was a momentary memory lapse induced by old code that was lying in my ~/bin
* Update function description for API tool:dteske2013-11-201-3/+4
| | | | bsdconfig includes -dF f_validate_hostname
* Make `-d' implicitly enable `-f' for simplification.dteske2013-11-202-3/+3
|
* Add a `-d' flag for printing the description of each function.dteske2013-11-202-8/+28
|
* Add new `includes' module for exploring the bsdconfig(8) API.dteske2013-11-208-3/+342
|
* Whitespace, style, sub-shells, and standardize variable namedteske2013-11-201-26/+20
| | | | (s/interfaces/menu_list/).
* "Tim trailing" -> "Trim trailing"trhodes2013-11-191-1/+1
|
* Follow-up to r258227 and document 'enabled' as a boolean instead ofbdrewery2013-11-191-2/+2
| | | | | | | | a string. Approved by: bapt MFC after: 2 days X-MFC-With: r258227
* Fix package installation from physical media such as DVD.dteske2013-11-173-14/+34
| | | | | Discussed with: re (gjb) MFC after: 3 days
* Always shutdown the media when we're exiting the packages module (preventsdteske2013-11-172-4/+3
| | | | | | | | | errors on re-entry for physical media). Also, while we're here, stop ejecting the CDROM when we're done with it (but leave the functions for later use so that we could perhaps -- from the installer standpoint -- use it to eject the media after an install). MFC after: 3 days
* Improve debugging with f_eval_catch() introduced by SVN r257784 and alsodteske2013-11-172-5/+8
| | | | | | | fix a bug where "pkg update" was not getting the value of PACKAGESITE. NB: PACKAGESITE needs to be explicitly exported in support of children. MFC after: 3 days
* Kick an unused orphan to the curb ;)dteske2013-11-171-2/+2
|
* Move function name declaration to top of function (where it is closest todteske2013-11-171-18/+18
| | | | | | | the value it needs to be), s/fname/funcname/g, and move function name usage to within printf format string. MFC after: 3 days
* argc is now usedbapt2013-11-161-1/+1
| | | | MFC after: 2 days
* Fix a couple of issues with -F:jhb2013-11-151-10/+18
| | | | | | | | | - Fix ALWAYS_INSTALL to take precedence over the FreeBSD ID checks. In particular, always install a file where the only change was the FreeBSD ID even if -F is specified. - Fix the -F option in the case that the only upstream change is a change in the FreeBSD ID and the local file is removed. - Add tests for these two cases.
* When verifying that files we need are present, also check that they don'tcperciva2013-11-141-2/+2
| | | | | | | | | have zero length. Filesystem corruption will tend to truncate files, and since these are short that's likely to result in them becoming empty. Suggested by: Richard Clayton Convinced by: rwatson MFC after: 3 weeks
* Escape a newline added in the previous commit when verifying the flagsjhb2013-11-131-1/+1
| | | | passed to the build, diff, or status commands.
* Add ENETUNREACH and EADDRNOTAVAIL to the list of errors that are potentiallyian2013-11-131-1/+3
| | | | transient and shouldn't result in closing the socket and giving up forever.
* This fixes 3 problems in syslogd related to sizing receive buffers...ian2013-11-131-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - A call was misplaced at the wrong level of nested if blocks, so that the buffers for unix domain sockets (/dev/log, /dev/klog) were never increased at all; they remained at a way-too-small default size of 4096. - The function that was supposed to double the size of the buffer sometimes did nothing, and sometimes installed a wildly-wrong buffer size (either too large or too small) due to an unitialized 'slen' variable passed to getsockopt(). Most often it doubled the UDP buffers from 40k to 80k because accidentally there would be harmless stack garbage in the unitialized variables. - The whole concept of blindly doubling a socket's buffer size without knowing what size it started at is a design flaw that has to be called a bug. If the double_rbuf() function had worked at all (I.E., if the other two bugs didn't exist) this would lead to UDP sockets having an 80k buffer while unix dgram sockets get an 8k buffer. There's nothing about the problem being solved that requires larger buffers for UDP than for unix dgram sockets -- the buffering requirements are the same regardless of socket type. This change renames the double_rbuf() function to increase_rbuf() and increases the buffer size on all types of sockets to 80k. 80k was chosen only because it appears to be the size the original change was shooting for, and it certainly seems to be reasonably large (I might have picked 64k in the absence of any historical guidance). PR: 160433 Submitted by: me, in 2011.
* Move the ioapic device model from userspace into vmm.ko. This is needed forneel2013-11-127-429/+11
| | | | | | | | | | upcoming in-kernel device emulations like the HPET. The ioctls VM_IOAPIC_ASSERT_IRQ and VM_IOAPIC_DEASSERT_IRQ are used to manipulate the ioapic pin state. Discussed with: grehan@ Submitted by: Tycho Nightingale (tycho.nightingale@pluribusnetworks.com)
* Add a pre-world mode of updating similar to the -p option that can bejhb2013-11-122-20/+115
| | | | | | | | | | passed to mergemaster. In this mode, only changes to /etc/master.passwd and /etc/group are merged to /etc. In addition, it uses a temporary tree to stage these changes rather than overwriting the existing 'current' and 'previous' trees so that a full update can be run after a normal installworld has completed. MFC after: 2 weeks
* Sort option flags and fix the width of the options list. This is a purelyjhb2013-11-121-21/+21
| | | | mechanical change, no content changes.
* Noted that the stripe_size argument was not being displayed in the usagesbruno2013-11-121-1/+1
| | | | | | message MFC after: 2 weeks
* Adds gpioiic.4 and gpioled.4 man pages. Moves some of the information thatloos2013-11-121-1/+3
| | | | | | | was previously available on gpio.4 to their respectives pages. Add the cross references on gpioctl.8. Approved by: adrian (mentor)
* Comments.dteske2013-11-121-2/+2
|
* Switch default MBR bootcode from /boot/boot0 to /boot/mbr.dteske2013-11-111-1/+1
| | | | | Reviewed by: Allan Jude, nwhitehorn Discussed on: -current
* Remove useless checks for NULL pointer before free(3)bdrewery2013-11-111-8/+4
| | | | | Reported by: eadler Approved by: eadler
* Do not use just freed memory.glebius2013-11-111-2/+2
| | | | Sponsored by: Nginx, Inc.
* Check the partition scheme before blowing away disks, instead of after.dteske2013-11-111-8/+12
| | | | | | The effects of this patch would only be noticeable if you were purposefully setting a bad value and trying to see what happens; and leaving the disks intact if a bad value has been set seems fair.
* Remove the env(1) but keep the var.dteske2013-11-111-2/+2
|
* Unbreak the installer on head/:gjb2013-11-111-0/+1
| | | | | | | | | | | | | | | | | | | | | When bsdinstall(8) sources the bsdconfig(8) common.subr file, PKG_ABI is set by calling 'pkg -vv' and searching for the ABI pkg(8) will use. When pkg(8) is run for the first time, the bootstrap process is run, which prompts for 'y/N' input from stdin if running with TERM set. Since TERM is set and it is the first time pkg(8) is run, which happens automatically, bsdinstall(8) hangs waiting for user input which is never displayed since a specific line is expected by awk(1), and stdin is expected by pkg(8). Set ASSUME_ALWAYS_YES=1, which will cause pkg(8) to assume the '-y' flag is also used for the bootstrap process, allowing bsdinstall(8) to proceed to the keymap lookup, otherwise bsdinstall(8) appears to hang after selecting 'Install' from the menu on first boot from CDROM.
* x86 platforms that use an IOAPIC route the legacy timer interrupt (IRQ0) toneel2013-11-112-3/+13
| | | | | | | | | pin 2 of the IOAPIC. Add an 'Interrupt Source Override' entry to the MADT to describe this and start asserting interrupts on pin 2 in the 8254 device model. Submitted by: Tycho Nightingale (tycho.nightingale@pluribusnetworks.com)
* Fix typo.trasz2013-11-101-2/+2
| | | | | | Submitted by: feld@ MFC after: 3 days Sponsored by: The FreeBSD Foundation
OpenPOWER on IntegriCloud