]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoAdd regression test for PR kern/189088.
asomers [Tue, 29 Apr 2014 15:12:23 +0000 (15:12 +0000)]
Add regression test for PR kern/189088.

PR: kern/189088
MFC after: 3 weeks
Sponsored by: Spectra Logic

10 years agoNLS is used by the build system.
imp [Tue, 29 Apr 2014 14:52:39 +0000 (14:52 +0000)]
NLS is used by the build system.

10 years agoFix a panic when removing an IP address from an interface, if the same address
asomers [Tue, 29 Apr 2014 14:46:45 +0000 (14:46 +0000)]
Fix a panic when removing an IP address from an interface, if the same address
exists on another interface.  The panic was introduced by change 264887, which
changed the fibnum parameter in the call to rtalloc1_fib() in
ifa_switch_loopback_route() from RT_DEFAULT_FIB to RT_ALL_FIBS.  The solution
is to use the interface fib in that call.  For the majority of users, that will
be equivalent to the legacy behavior.

PR: kern/189089
Reported by: neel
Reviewed by: neel
MFC after: 3 weeks
X-MFC with: 264887
Sponsored by: Spectra Logic

10 years agoDo not use senderr() in rtrequest1_fib_change().
melifaro [Tue, 29 Apr 2014 12:52:36 +0000 (12:52 +0000)]
Do not use senderr() in rtrequest1_fib_change().

Suggested by: glebius
MFC after: 4 weeks

10 years agoMerge r133175 from upstream:
marius [Tue, 29 Apr 2014 11:31:22 +0000 (11:31 +0000)]
Merge r133175 from upstream:

2008-03-13  Dennis Czeremin  <dennis.czeremin@smiths-heimann.com>

PR libstdc++/35566
* include/bits/stl_multimap.h (multimap<>::multimap(_InputIterator,
_InputIterator)): Forward to _M_insert_equal, not _M_insert_unique.

This patch was GPL2 at the time and fixes a regression introduced with
the merge of GCC r129013 in FreeBSD r236829.

MFC after: 3 days
Sponsored by: Bally Wulff Games & Entertainment GmbH

10 years agoAfter r264897 restore the ability to add bootoptions from FDT for
bz [Tue, 29 Apr 2014 07:48:07 +0000 (07:48 +0000)]
After r264897 restore the ability to add bootoptions from FDT for
platforms which do not use loaders or kernels that want to hardcode
options or for FDT passed in by loader.

Also fix a build issue by putting the kmdp variable accessed back under
the #ifdef FDT;  we may wish to revisit decision in which case more
code needs changing.

Submitted by: brooks

10 years agoAdd standard SYNOPSIS wording, fix typos, contractions and new sentence -> new line.
brueffer [Tue, 29 Apr 2014 07:45:21 +0000 (07:45 +0000)]
Add standard SYNOPSIS wording, fix typos, contractions and new sentence -> new line.

10 years agoFix formatting of the -a option in usage() to be consistent.
scottl [Tue, 29 Apr 2014 07:19:22 +0000 (07:19 +0000)]
Fix formatting of the -a option in usage() to be consistent.

Obtained from: Netflix, Inc.
MFC after: 3 days

10 years agoDocument the -a option that was added in r262424.
scottl [Tue, 29 Apr 2014 07:17:33 +0000 (07:17 +0000)]
Document the -a option that was added in r262424.

Obtained from: Netflix, Inc.
MFC after: 3 days

10 years agoRemove redundant include
bdrewery [Tue, 29 Apr 2014 01:17:43 +0000 (01:17 +0000)]
Remove redundant include

MFC after: 3 days

10 years agoAdd dependency for libm to libstdc++. This fixes high -j value builds
imp [Mon, 28 Apr 2014 23:16:46 +0000 (23:16 +0000)]
Add dependency for libm to libstdc++. This fixes high -j value builds
when not building with clang.

Submitted by: ian@

10 years agoAllow a virtual machine to be forcibly reset or powered off. This is done
neel [Mon, 28 Apr 2014 22:06:40 +0000 (22:06 +0000)]
Allow a virtual machine to be forcibly reset or powered off. This is done
by adding an argument to the VM_SUSPEND ioctl that specifies how the virtual
machine should be suspended, viz. VM_SUSPEND_RESET or VM_SUSPEND_POWEROFF.

The disposition of VM_SUSPEND is also made available to the exit handler
via the 'u.suspended' member of 'struct vm_exit'.

This capability is exposed via the '--force-reset' and '--force-poweroff'
arguments to /usr/sbin/bhyvectl.

Discussed with: grehan@

10 years agoRemove note about hw.bus.devctl_disable removal, restored
gjb [Mon, 28 Apr 2014 20:40:36 +0000 (20:40 +0000)]
Remove note about hw.bus.devctl_disable removal, restored
in r265060.

Sponsored by: The FreeBSD Foundation

10 years agoRevert r263754, re-adding support for hw.bus.devctl_disable. Breaking
brooks [Mon, 28 Apr 2014 20:38:08 +0000 (20:38 +0000)]
Revert r263754, re-adding support for hw.bus.devctl_disable.  Breaking
old devd's and thus hosts that get IP addresses from DHCP was too much
of a POLA violation.

The sysctl may be removed again after r263758 has been merged to at
least stable/9 and stable/10, and releases have been cut from those
branches.

Discussed with: mjg
Reported by: theraven, rwatson

10 years agoSet the new floating point exception mask correctly
andrew [Mon, 28 Apr 2014 18:54:12 +0000 (18:54 +0000)]
Set the new floating point exception mask correctly

Submitted by: Keith White <kwhite@site.uottawa.ca>

10 years agoImplement legacy interrupts for the AHCI device emulation
grehan [Mon, 28 Apr 2014 18:41:25 +0000 (18:41 +0000)]
Implement legacy interrupts for the AHCI device emulation
according to the method outlined in the AHCI spec.

Tested with FreeBSD 9/10/11 with MSI disabled,
and also NetBSD/amd64 (lightly).

Reviewed by: neel, tychon
MFC after: 3 weeks

10 years agoTurn off various fancy instruction sets, as well as deduplicate some options.
nwhitehorn [Mon, 28 Apr 2014 18:25:21 +0000 (18:25 +0000)]
Turn off various fancy instruction sets, as well as deduplicate some options.
This makes the EFI loader build work with CPUTYPE=native in make.conf on
my Core i5.

10 years agoAdd a C libary and a Python module that implements an API similar
marcel [Mon, 28 Apr 2014 18:06:11 +0000 (18:06 +0000)]
Add a C libary and a Python module that implements an API similar
to bus_space(9) and that uses the proto(4) driver for talking to
hardware. If the I/O resource is a memory mapped I/O resource,
then mmap(2) will be attempted to avoid read(2)/write(2) overhead.

Sponsored by: Juniper Networks, Inc.

10 years agoAdd proto(4): A driver for prototyping and diagnostics.
marcel [Mon, 28 Apr 2014 17:58:40 +0000 (17:58 +0000)]
Add proto(4): A driver for prototyping and diagnostics.
It exposes I/O resources to user space, so that programs can peek
and poke at the hardware. It does not itself have knowledge about
the hardware device it attaches to.

Sponsored by: Juniper Networks, Inc.

10 years agoReduce number of opens by REOM RAID during provider taste.
mav [Mon, 28 Apr 2014 15:03:52 +0000 (15:03 +0000)]
Reduce number of opens by REOM RAID during provider taste.

Instead opening/closing provider by each of metadata classes, do it only
once in core code.  Since for SCSI disks open/close means sending some
SCSI commands to the device, this change reduces taste time.

MFC after: 2 weeks
Sponsored by: iXsystems, Inc.

10 years agoDrop explicit unsigned from FD_SETSIZE constant
emaste [Mon, 28 Apr 2014 13:42:41 +0000 (13:42 +0000)]
Drop explicit unsigned from FD_SETSIZE constant

FD_SETSIZE is often used as an argument to select or compared with an
integer file descriptor.  Rather than force 3rd party software to add
explicit casts, just make it a plain (int) constant as on other
operating systems.

Previous discussion:
http://lists.freebsd.org/pipermail/freebsd-standards/2012-July/002410.html

10 years agoFix ZIO reordering done by vdev_queue_io causing panics when zio_vdev_io_start
smh [Mon, 28 Apr 2014 09:00:00 +0000 (09:00 +0000)]
Fix ZIO reordering done by vdev_queue_io causing panics when zio_vdev_io_start
returns ZIO_PIPELINE_CONTINUE from vdev_op_io_start to zio_execute resulting
in the wrong ZIO continuing its pipeline.

This is a serious issue which could cause data loss / corruption but appears
to be limited to error handling such as when vdev_readable(vd) returns false.

MFC after: 2 days

10 years agobsd-family-tree: Fix date
eadler [Mon, 28 Apr 2014 06:24:37 +0000 (06:24 +0000)]
bsd-family-tree: Fix date

10 years agoMove common device tree informations to separate dtsi files for A10 and A20 SoC.
ganbold [Mon, 28 Apr 2014 05:39:20 +0000 (05:39 +0000)]
Move common device tree informations to separate dtsi files for A10 and A20 SoC.
Change cubieboard1 and cubieboard2 dts files accordingly.

Approved by: stas (mentor)

10 years agoDon't use multiprocessing-extensions instruction on processors that don't
ian [Mon, 28 Apr 2014 02:35:28 +0000 (02:35 +0000)]
Don't use multiprocessing-extensions instruction on processors that don't
support SMP.

Submitted by: loos@
Pointy hat to: me

10 years agoMove duplicated code to print l2 cache config into the common code.
ian [Sun, 27 Apr 2014 23:47:38 +0000 (23:47 +0000)]
Move duplicated code to print l2 cache config into the common code.

10 years agoNote that the AR9380 and later hardware supports MYBEACON.
adrian [Sun, 27 Apr 2014 23:37:39 +0000 (23:37 +0000)]
Note that the AR9380 and later hardware supports MYBEACON.

(Yes, I said AR5416 in the committed code.  It's still strictly true.)

10 years agoNote that the AR5416 and later hardware supports the MYBEACON RX filter.
adrian [Sun, 27 Apr 2014 23:37:03 +0000 (23:37 +0000)]
Note that the AR5416 and later hardware supports the MYBEACON RX filter.

10 years ago* Add a new capability which returns whether the hardware supports
adrian [Sun, 27 Apr 2014 23:36:44 +0000 (23:36 +0000)]
* Add a new capability which returns whether the hardware supports
  the MYBEACON RX filter (only receive beacons which match the BSSID)
  or all beacons on the current channel.

* Add the relevant RX filter entry for MYBEACON.

Tested:

* AR5416, STA
* AR9285, STA

TODO:

* once the code is in -HEAD, just make sure that the code which uses it
  correctly sets BEACON for pre-AR5416 chips.

Obtained from: QCA, Linux ath9k

10 years agoProgram the AR_TSFOOR_THRESHOLD register with a default lifted from
adrian [Sun, 27 Apr 2014 23:35:05 +0000 (23:35 +0000)]
Program the AR_TSFOOR_THRESHOLD register with a default lifted from
the QCA HAL.

This fires off an interrupt if the TSF from the AP / IBSS peer is
wildly out of range.  I'll add some code to the ath(4) driver soon
which makes use of this.

TODO:

* verify this didn't break TDMA!

10 years agoFix the AR_SLEEP1 and AR_SLEEP2 definitions. Oops!
adrian [Sun, 27 Apr 2014 23:33:37 +0000 (23:33 +0000)]
Fix the AR_SLEEP1 and AR_SLEEP2 definitions. Oops!

Tested:

* AR9285, STA
* AR5416, STA

Obtained from: QCA, Linux ath9k

10 years agoDo a read-after-write to ensure the interrupt register update is flushed
adrian [Sun, 27 Apr 2014 23:31:42 +0000 (23:31 +0000)]
Do a read-after-write to ensure the interrupt register update is flushed
to the hardware.

The QCA HAL has a comment noting that if this isn't done, modifications
to AR_IMR_S2 before AR_IMR is flushed may produce spurious interrupts.

Obtained from: QCA

10 years agoDisable the beastie menu for EFI console which doesn't support ANSI codes
dteske [Sun, 27 Apr 2014 22:18:33 +0000 (22:18 +0000)]
Disable the beastie menu for EFI console which doesn't support ANSI codes
(so things like `at-xy', `clear', and other commands don't work making it
impossible to generate a living menu).

Reviewed by: nwhitehorn, emaste

10 years agoFix build
melifaro [Sun, 27 Apr 2014 21:17:54 +0000 (21:17 +0000)]
Fix build

Found by: ian
Pointyhat to: me

10 years agoNo EFI on i386. This unbreaks the i386 VT kernel build.
nwhitehorn [Sun, 27 Apr 2014 20:36:19 +0000 (20:36 +0000)]
No EFI on i386. This unbreaks the i386 VT kernel build.

10 years agoExplain why wbinv_all is SMP-safe in this case, and add a missing l2 cache
ian [Sun, 27 Apr 2014 20:26:15 +0000 (20:26 +0000)]
Explain why wbinv_all is SMP-safe in this case, and add a missing l2 cache
flush.  (Either it was missing here, or it isn't needed in the minidump
case.  Adding it here seems like the safer path to consistancy.)

10 years agoFlush and invalidate caches on each CPU as part of handling IPI_STOP.
ian [Sun, 27 Apr 2014 20:16:51 +0000 (20:16 +0000)]
Flush and invalidate caches on each CPU as part of handling IPI_STOP.

Flushing the caches is required before doing a panic dump, but ARM
doesn't provide a flavor of flush that gets broadcast to other cores.
However, all cores except one are stopped before doing a dump, so this
works around the lack of a global flush/invalidate by doing it locally
on each CPU as part of stopping.

Discussed with: cognet@

10 years agoThere is no difference between IPI_STOP and IPI_STOP_HARD on ARM, so
ian [Sun, 27 Apr 2014 20:01:59 +0000 (20:01 +0000)]
There is no difference between IPI_STOP and IPI_STOP_HARD on ARM, so
map them both to the same interrupt number like other arches do.

10 years agoRemove cpu_idcache_wbinv_all() from kdb_cpu_trap(), it's no longer needed.
ian [Sun, 27 Apr 2014 18:12:55 +0000 (18:12 +0000)]
Remove cpu_idcache_wbinv_all() from kdb_cpu_trap(), it's no longer needed.

This was added ca. 2004 for the purpose of ensuring the caches were in the
right state after the debugger set a breakpoint.  kdb_cpu_sync_icache()
was added in 2007 to handle that situation, and now the wbinv_all is
actually harmful because the operation isn't broadcast to other cores.

10 years agoImprove memory allocation model for rt_msg2() rtsock messages:
melifaro [Sun, 27 Apr 2014 17:41:18 +0000 (17:41 +0000)]
Improve memory allocation model for rt_msg2() rtsock messages:
 * memory is now allocated as early as possible, without holding locks.
 * sysctl users are now guaranteed to get a response (M_WAITOK buffer prealloc).
 * socket users are more likely to use on-stack buffer for replies.
 * standard kernel malloc/free functions are now used instead of radix wrappers.
rt_msg2() has been renamed to rtsock_msg_buffer().

MFC after: 1 month

10 years agoTurn off the full witness trace on console output.
gjb [Sun, 27 Apr 2014 16:40:40 +0000 (16:40 +0000)]
Turn off the full witness trace on console output.

On head/, or more specifically, when WITNESS is in
the kernel config, the console is spammed excessively
with lock order reversal between isofs and devfs.

Set debug.witness.trace=0 in the installer sysctl.conf
to avoid printing the full KDB stack backtrace.  This
does not prevent printing the lock order reversal has
happened, only lessens the console spam.

Sponsored by: The FreeBSD Foundation

10 years agoloader's GPT support on BIOS does not seem to like the root filesystem
nwhitehorn [Sun, 27 Apr 2014 16:34:59 +0000 (16:34 +0000)]
loader's GPT support on BIOS does not seem to like the root filesystem
being the last filesystem on the disk for some reason when made by this
script. Add a vestigial swap partition to allow this to boot with QEMU
BIOS.

10 years agoFinish connecting up installer UEFI support. If the kernel was booted using
nwhitehorn [Sun, 27 Apr 2014 15:58:07 +0000 (15:58 +0000)]
Finish connecting up installer UEFI support. If the kernel was booted using
EFI, set up the disks for an EFI system. If booted from BIOS/CSM, set up
for BIOS.

10 years agoSetting the IMOD value below 0x3F8 can cause IRQ lockups in the Intel
hselasky [Sun, 27 Apr 2014 15:41:44 +0000 (15:41 +0000)]
Setting the IMOD value below 0x3F8 can cause IRQ lockups in the Intel
LynxPoint USB 3.0 controllers found in MacBookPro 2013's.

MFC after: 2 days
Tested by: Huang Wen Hui <huanghwh@gmail.com>

10 years agoReport boot method (BIOS/UEFI) via sysctl machdep.bootmethod
emaste [Sun, 27 Apr 2014 15:14:59 +0000 (15:14 +0000)]
Report boot method (BIOS/UEFI) via sysctl machdep.bootmethod

Sponsored by: The FreeBSD Foundation

10 years agoRevert r258678. Make the led gpio-specifier match again the #gpio-cells
loos [Sun, 27 Apr 2014 13:10:51 +0000 (13:10 +0000)]
Revert r258678.  Make the led gpio-specifier match again the #gpio-cells
settings from the GPIO controller, which i had broken in r258678.  Restore
the active-low flag.

10 years agoFix the gpio-specifier decoding by respecting the GPIO controller's
loos [Sun, 27 Apr 2014 12:11:00 +0000 (12:11 +0000)]
Fix the gpio-specifier decoding by respecting the GPIO controller's
#gpio-cells property.

Add a new ofw_bus method (OFW_BUS_MAP_GPIOS()) that allows the GPIO
controller to implement its own mapping to deal with gpio-specifiers,
allowing the decoding of gpio-specifiers to be controller specific.

The default ofw_bus_map_gpios() decodes the linux standard (#gpio-cells =
<2>) and the FreeBSD standard (#gpio-cells = <3>).

It pass the gpio-specifier flag field to the children as an ivar variable so
they can act upon.

10 years agoRemove useless zeroing of RTAX_DST on error.
melifaro [Sun, 27 Apr 2014 10:43:48 +0000 (10:43 +0000)]
Remove useless zeroing of RTAX_DST on error.
Cleanup a bit.

MFC after: 1 month

10 years agoCleanup route_output() a bit.
melifaro [Sun, 27 Apr 2014 10:20:37 +0000 (10:20 +0000)]
Cleanup route_output() a bit.

MFC after: 1 month

10 years agoDo not delay freeing rtm. Bandaid added in r227061 is not needed since r227061,
melifaro [Sun, 27 Apr 2014 09:49:35 +0000 (09:49 +0000)]
Do not delay freeing rtm. Bandaid added in r227061 is not needed since r227061,

MFC after: 1 month

10 years agoSame as it was done in r263878 for invlrng_handler(), fix order of
kib [Sun, 27 Apr 2014 05:37:01 +0000 (05:37 +0000)]
Same as it was done in r263878 for invlrng_handler(), fix order of
checks for special pcid values in invlpg_pcid_handler().  Forst check
for special values, and only then do PCID-specific page invalidation.

Minor fix to the style compliance, declare local variable at the
function start.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

10 years agoFix order of libthr and libc in the global dso list for sshd, by
kib [Sun, 27 Apr 2014 05:28:14 +0000 (05:28 +0000)]
Fix order of libthr and libc in the global dso list for sshd, by
explicitely linking main binary with -lpthread.  Before, libthr
appeared in the list due to dependency of one of the kerberos libs.
Due to the change in ld(1) behaviour of not copying NEEDED entries
from direct dependencies into the link results, the order becomes
reversed.

The libthr must appear before libc to properly interpose libc symbols
and provide working rtld locks implementation.  The symptom was sshd
hanging on rtld bind lock during nested symbol binding from a signal
handler.

Approved by: des (openssh maintainer)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

10 years agoWhen vm_fault_copy_entry() is called from vm_map_protect() for a wired
kib [Sun, 27 Apr 2014 05:19:01 +0000 (05:19 +0000)]
When vm_fault_copy_entry() is called from vm_map_protect() for a wired
entry and performs the upgrade of the entry permissions from read-only
to read-write, we must allow to search for the source pages in the
backing object, like we do in the case of forking the read-only wired
entry. For the fork case, the behaviour is allowed by src_readonly
boolean, which in fact is only used to assert that read-write case
provides all source pages in the top-level object.

Eliminate the src_readonly variable.  Allow for the copy loop to look
into the backing objects, add explicit asserts to ensure that only
read-only and upgrade case actually does.

Expand comments. Change the panic call into assert.

Reported by: markj
Tested by: markj, pho (previous version)
Reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

10 years agoDon't need this now. VT does the same thing, but better.
nwhitehorn [Sun, 27 Apr 2014 02:28:32 +0000 (02:28 +0000)]
Don't need this now. VT does the same thing, but better.

Submitted by: gjb

10 years agoAdd vt_efifb to VT kernel configuration now that that actually works. This
nwhitehorn [Sun, 27 Apr 2014 02:22:21 +0000 (02:22 +0000)]
Add vt_efifb to VT kernel configuration now that that actually works. This
kernel will now boot on both BIOS and EFI systems without modification.
Equivalent functionality in GENERIC requires making vt(9) the default console
driver, which is probably appropriate at this point.

10 years agoIncrease the maximum framebuffer size to more reasonable values reflecting
nwhitehorn [Sun, 27 Apr 2014 02:20:51 +0000 (02:20 +0000)]
Increase the maximum framebuffer size to more reasonable values reflecting
the high-resolution boot consoles present on Open Firmware and EFI systems.

10 years agoMove up fibnum to ensure it is always defined.
melifaro [Sun, 27 Apr 2014 02:20:09 +0000 (02:20 +0000)]
Move up fibnum to ensure it is always defined.

Found by: ian
MFC with: r264987

10 years agoDisable vga if EFI framebuffer present. vt(9) should handle this internally
nwhitehorn [Sun, 27 Apr 2014 02:19:53 +0000 (02:19 +0000)]
Disable vga if EFI framebuffer present. vt(9) should handle this internally
based on efifb's higher priority, but it doesn't, and this at least lets
us build a kernel that boots on both BIOS and EFI systems for now.

10 years agoAdd script to setup bootable CD ISOs for both BIOS and EFI systems. Tested
nwhitehorn [Sun, 27 Apr 2014 01:06:02 +0000 (01:06 +0000)]
Add script to setup bootable CD ISOs for both BIOS and EFI systems. Tested
and working on QEMU. Actually using this script as the regular image
generator, like with the memstick one, will require that the kernel support
EFI too. In particular, the following two things are required:
1. vt(9) be the default console driver
2. vt_efifb and vt_vga be able to coexist usefully in the same kernel

One other note here is that this requires newfs_msdos and mdconfig, which is
really ugly. NetBSD's makefs at least seems to support FAT now. If that
actually works, it should be imported and we can get rid of the mdconfig mess.

10 years agoProvide a proper armv7 implementation of icache_sync_all rather than
ian [Sun, 27 Apr 2014 00:46:01 +0000 (00:46 +0000)]
Provide a proper armv7 implementation of icache_sync_all rather than
using armv7_idcache_wbinv_all, because wbinv_all doesn't broadcast the
operation to other cores.  In elf_cpu_load_file() use icache_sync_all()
and explain why it's needed (and why other sync operations aren't).

As part of doing this, all callers of cpu_icache_sync_all() were
inspected to ensure they weren't relying on the old side effect of
doing a wbinv_all along with the icache work.

10 years agoRevert to FAT12. This file system is apparently too small for FAT32, even
nwhitehorn [Sun, 27 Apr 2014 00:45:08 +0000 (00:45 +0000)]
Revert to FAT12. This file system is apparently too small for FAT32, even
if the old (pre r264889) newfs_msdos allowed it. And FAT12 seems to work
perfectly well.

10 years agoMake a dual-boot BIOS/UEFI memstick image. Testing required before this gets
nwhitehorn [Sun, 27 Apr 2014 00:40:18 +0000 (00:40 +0000)]
Make a dual-boot BIOS/UEFI memstick image. Testing required before this gets
renamed make-memstick.sh.

10 years agoUse logical rather than bitwise OR in if() expression.
ian [Sat, 26 Apr 2014 23:22:49 +0000 (23:22 +0000)]
Use logical rather than bitwise OR in if() expression.

10 years agoCall cpu_icache_sync_range() rather than sync_all since we know the range
ian [Sat, 26 Apr 2014 23:09:01 +0000 (23:09 +0000)]
Call cpu_icache_sync_range() rather than sync_all since we know the range
and flushing the entire icache is needlessly expensive.

10 years agoRemove useless `register' declarations.
melifaro [Sat, 26 Apr 2014 22:42:21 +0000 (22:42 +0000)]
Remove useless `register' declarations.

MFC after: 1 month

10 years agoA VMCS is always inactive when it exits the vmx_run() loop.
neel [Sat, 26 Apr 2014 22:37:56 +0000 (22:37 +0000)]
A VMCS is always inactive when it exits the vmx_run() loop.
Remove redundant code and the misleading comment that suggest otherwise.

Reviewed by: grehan@

10 years agoDetermine fibnum once in the beginning of route_output().
melifaro [Sat, 26 Apr 2014 22:32:04 +0000 (22:32 +0000)]
Determine fibnum once in the beginning of route_output().

MFC after: 1 month

10 years agoDecouple RTM_CHANGE from RTM_GET handling in rtsock.c:route_output().
melifaro [Sat, 26 Apr 2014 21:03:41 +0000 (21:03 +0000)]
Decouple RTM_CHANGE from RTM_GET handling in rtsock.c:route_output().
RTM_CHANGE is now handled inside route.c:rtrequest1_fib() as it should be.
Note change change handler is a separate function rtrequest1_fib_change().

MFC after: 1 month

10 years agoReword a comment block a bit; no functional changes.
ian [Sat, 26 Apr 2014 20:27:58 +0000 (20:27 +0000)]
Reword a comment block a bit; no functional changes.

10 years agoRetire smp_active. It was racey and caused demonstrated problems with
scottl [Sat, 26 Apr 2014 20:27:54 +0000 (20:27 +0000)]
Retire smp_active.  It was racey and caused demonstrated problems with
the cpufreq code.  Replace its use with smp_started.  There's at least
one userland tool that still looks at the kern.smp.active sysctl, so
preserve it but point it to smp_started as well.

Discussed with: peter, jhb
MFC after: 3 days
Obtained from: Netflix

10 years agoFlesh out imx_uart_init() so that we're not relying on u-boot to init
ian [Sat, 26 Apr 2014 20:03:04 +0000 (20:03 +0000)]
Flesh out imx_uart_init() so that we're not relying on u-boot to init
the hardware (meaning uarts other than the console will work).

10 years agoFix gcc build, initialize off variable.
andreast [Sat, 26 Apr 2014 19:30:04 +0000 (19:30 +0000)]
Fix gcc build, initialize off variable.

10 years agoThe freescale imx uart driver works for the whole i.MX family, so rename the
ian [Sat, 26 Apr 2014 17:56:39 +0000 (17:56 +0000)]
The freescale imx uart driver works for the whole i.MX family, so rename the
header file to not have "5xx" in the name.

10 years agoApparently this is supposed to be FAT32, not FAT12.
nwhitehorn [Sat, 26 Apr 2014 17:51:41 +0000 (17:51 +0000)]
Apparently this is supposed to be FAT32, not FAT12.

10 years agomake_dtb.sh is designed to be used in a kernel build environment where
imp [Sat, 26 Apr 2014 16:58:35 +0000 (16:58 +0000)]
make_dtb.sh is designed to be used in a kernel build environment where
MACHINE is defined to the target's value, not the host's
value. However, in Makefile.inc1, it is still defined to be the host's
value. Make the makedtb target work by expanding TARGET in the
existance test, and passing MACHINE=$TARGET in the call to make_dtb.sh

10 years agoAdd EFI support to the installer. This requires that the kernel provide
nwhitehorn [Sat, 26 Apr 2014 16:55:38 +0000 (16:55 +0000)]
Add EFI support to the installer. This requires that the kernel provide
a sysctl to determine what firmware is in use. This sysctl does not exist
yet, so the following blocks are in front of the wheels:
- I've provisionally called this "hw.platform" after the equivalent thing
  on PPC
- The logic to check the sysctl is short-circuited to always choose BIOS.
  There's a comment in the top of the file about how to turn this off.

If IA64 acquired a boot1.efifat-like thing (probably with very few
modifications), the same code could be adapted there.

10 years agoStop calling imx51_ccm_foo() clock functions from imx6 code. Instead
ian [Sat, 26 Apr 2014 16:48:09 +0000 (16:48 +0000)]
Stop calling imx51_ccm_foo() clock functions from imx6 code.  Instead
define a few imx_ccm_foo() functions that are implemented by the imx51 or
imx6 ccm code.  Of course, the imx6 ccm code is still more a wish than
reality, so for now its implementations just return hard-coded numbers.

10 years agoUse "hash" value in rtalloc_mpath_fib() instead of RTF_ANNOUNCE flag.
melifaro [Sat, 26 Apr 2014 16:46:33 +0000 (16:46 +0000)]
Use "hash" value in rtalloc_mpath_fib() instead of RTF_ANNOUNCE flag.
Hashing method is the same as in in6_src.c. (Probably we need better one).

MFC after: 2 weeks

10 years agoAdd generation of an EFI filesystem to hold boot1.efi. This is a near-exact
nwhitehorn [Sat, 26 Apr 2014 16:34:22 +0000 (16:34 +0000)]
Add generation of an EFI filesystem to hold boot1.efi. This is a near-exact
copy of the code from boot1.chrp again.

The resulting image is installed to /boot/boot1.efifat. If dd'ed to an 800K
"efi" partition, it should result in a bootable system.

10 years agoRemove sa_equal() definition since it is already defined in net/route.h.
melifaro [Sat, 26 Apr 2014 16:12:39 +0000 (16:12 +0000)]
Remove sa_equal() definition since it is already defined in net/route.h.

Noted by: ian
MFC after: 2 weeks

10 years agoUnify sa_equal() macro usage.
melifaro [Sat, 26 Apr 2014 14:52:03 +0000 (14:52 +0000)]
Unify sa_equal() macro usage.

MFC after: 2 weeks

10 years agoInitialize rssi variable.
kevlo [Sat, 26 Apr 2014 14:39:58 +0000 (14:39 +0000)]
Initialize rssi variable.

10 years agodate(1): Forgot to update manpage date in r264968
dumbbell [Sat, 26 Apr 2014 13:53:04 +0000 (13:53 +0000)]
date(1): Forgot to update manpage date in r264968

MFC after: 1 week
MFC with: 264968

10 years agoCorrectly set the sysctl format to Alphanumeric, rather than letting it default.
markm [Sat, 26 Apr 2014 13:21:28 +0000 (13:21 +0000)]
Correctly set the sysctl format to Alphanumeric, rather than letting it default.

Approved by: security-officer(des)

10 years agodate(1): Add "-R" flag to use RFC 2822 date and time output format
dumbbell [Sat, 26 Apr 2014 13:05:56 +0000 (13:05 +0000)]
date(1): Add "-R" flag to use RFC 2822 date and time output format

As stated in the man page, this is equivalent to use "%a, %d %b %Y %T %z"
as the output format while LC_TIME is set to the "C" locale.

This is compatible with date(1) from the GNU core utilities.

10 years agoAdd sysctl OIDs showing the actual size and capacity of the swap zone.
des [Sat, 26 Apr 2014 12:18:17 +0000 (12:18 +0000)]
Add sysctl OIDs showing the actual size and capacity of the swap zone.

MFC after: 1 week

10 years agoNote that the bug was fixed, and when.
des [Sat, 26 Apr 2014 12:16:40 +0000 (12:16 +0000)]
Note that the bug was fixed, and when.

10 years agor261913 broke DES passwords, because the only way they could work,
des [Sat, 26 Apr 2014 11:50:25 +0000 (11:50 +0000)]
r261913 broke DES passwords, because the only way they could work,
since they don't have an easily recognizable signature, was if they
were the default.  This commit rewrites crypt_set_format(3) etc to
address this:

 - Use a pointer instead of an index to identify the default format.
   This pointer is initialized at compile time to point to the first
   first element in the list of supported formats, eliminating the
   need for crypt_setdefault().  Using a pointer also simplifies
   iterating through the list.

 - Associate DES with the magic string "_", which takes care of the
   Extended DES format.

 - Finally, as a special case, if the salt does not match any known
   magic string but matches ^[./0-9A-Za-z]{13}$, it is assumed to be a
   DES password and is passed on to crypt_des().

MFC after: 1 week

10 years agoDefine startup order the same way as it is in dummynet.
trociny [Sat, 26 Apr 2014 08:05:16 +0000 (08:05 +0000)]
Define startup order the same way as it is in dummynet.

10 years agoAdd a UEFI kernel configuration to include the VT kernel, and
gjb [Fri, 25 Apr 2014 21:47:24 +0000 (21:47 +0000)]
Add a UEFI kernel configuration to include the VT kernel, and
replace the vt_vga driver with vt_efifb.

This is intended to help with snapshot builds only.

There is no intention to MFC this commit.

Sponsored by: The FreeBSD Foundation

10 years agoAdd a separate script to build the memstick.img and the
gjb [Fri, 25 Apr 2014 21:11:00 +0000 (21:11 +0000)]
Add a separate script to build the memstick.img and the
mini-memstick.img with UEFI support.

As the comments in the file suggest, 1) there must
be existing ${.OBJDIR}/usr/src/release/{release,bootonly};
2) TARGET/TARGET_ARCH must be amd64; and 3) it must be
a vt(4)-enabled kernel with vt_efifb (*not* vt_vga).

This script is not hooked into release/Makefile in any way
until further testing is complete.

Sponsored by: The FreeBSD Foundation

10 years agoThe FTDI product ID we've been calling BEAGLEBONE is actually TI XDS100V2,
ian [Fri, 25 Apr 2014 19:47:27 +0000 (19:47 +0000)]
The FTDI product ID we've been calling BEAGLEBONE is actually TI XDS100V2,
a jtag debugging product, which was used on early Beaglebone boards (later
boards used a standard FTDI 2232C product ID).  Change the name accordingly,
and also add an entry for XDS100V3, the latest version of that product
which has its own new product ID number.

10 years agoFix indentation for diff reduction with commits to follow.
gjb [Fri, 25 Apr 2014 19:43:18 +0000 (19:43 +0000)]
Fix indentation for diff reduction with commits to follow.

Sponsored by: The FreeBSD Foundation

10 years agoGeneralize FOO.clang to FOO.${COMPILER_TYPE}. There's no reason these
imp [Fri, 25 Apr 2014 19:25:57 +0000 (19:25 +0000)]
Generalize FOO.clang to FOO.${COMPILER_TYPE}. There's no reason these
need to be clang specific. Also generalize things a bit.

10 years agoSplit up the options into those used only by bsd.mk.* or sys.mk and
imp [Fri, 25 Apr 2014 19:25:53 +0000 (19:25 +0000)]
Split up the options into those used only by bsd.mk.* or sys.mk and
the rest. Add note of caution for the surprises that popped up. MK_SSP
is the only one used by sys.mk, and it likely needs even extra
attention.

10 years agoEliminate NO_INCS. It is used one place, and MK_TOOLCHAIN=no will
imp [Fri, 25 Apr 2014 19:25:45 +0000 (19:25 +0000)]
Eliminate NO_INCS. It is used one place, and MK_TOOLCHAIN=no will
handle the job just as well. Opt for simplicity rather than one more
option.

10 years agoNow that all the NO_foo expressed in this loop have been removed from
imp [Fri, 25 Apr 2014 19:25:37 +0000 (19:25 +0000)]
Now that all the NO_foo expressed in this loop have been removed from
the tree, start warning that NO_foo is deprecated. It was supposed to
be gone from the tree as a user-setting a long time ago...

10 years agoSpell NO_PROFILE= as MK_PROFILE=no.
imp [Fri, 25 Apr 2014 19:25:26 +0000 (19:25 +0000)]
Spell NO_PROFILE= as MK_PROFILE=no.

10 years agoNO_DEBUG_FILES -> MK_DEBUG_FILES=no in last remaining place.
imp [Fri, 25 Apr 2014 19:25:18 +0000 (19:25 +0000)]
NO_DEBUG_FILES -> MK_DEBUG_FILES=no in last remaining place.

10 years agoKill last remaining NO_INSTALLLIB in tree by converting it over to
imp [Fri, 25 Apr 2014 19:25:13 +0000 (19:25 +0000)]
Kill last remaining NO_INSTALLLIB in tree by converting it over to
MK_INSTALLIB=no.