]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoMFH
gjb [Tue, 2 Feb 2016 22:27:48 +0000 (22:27 +0000)]
MFH

Sponsored by: The FreeBSD Foundation

8 years agoFirst pass to fix the 'tests' packages.
gjb [Tue, 2 Feb 2016 22:26:49 +0000 (22:26 +0000)]
First pass to fix the 'tests' packages.

Sponsored by: The FreeBSD Foundation

8 years agoFor +=/-=, add . and / to convenience characters
dteske [Tue, 2 Feb 2016 22:18:43 +0000 (22:18 +0000)]
For +=/-=, add . and / to convenience characters

sysrc(8) supports key+=value and key-=value, but can be told what the
delimiter is by being passed as char1 (e.g., "sysrc key+=",value" to use a
comma as the delimiter instead of space). For convenience, if the first char
is alpha-numeric, it is assumed you wanted whitespace as the delimiter.

However, if you naively (as I just did) execute:
sysrc rc_conf_files+=/etc/rc.conf.other
the result is unexpected.

This commit makes `.' and `/' in-addition to alpha-numeric first-characters
to cause the default of whitespace to be used as the delimiter. This also
means that you can no longer use these as a delimiter.

8 years agoReplace (Qo \ Qc) with (Qo (space) Qc)
dteske [Tue, 2 Feb 2016 21:58:17 +0000 (21:58 +0000)]
Replace (Qo \  Qc) with (Qo (space) Qc)

When using col(1) piped to vim(1) as pager for man(1), the former sequence
of (Qo \  Qc) renders as "" without the space. Replace with (Qo (space) Qc)
which renders properly in more (all?) pagers.

8 years agoUse pmap_preboot_map_attr() directly in arm_devmap_bootstrap()
skra [Tue, 2 Feb 2016 21:17:25 +0000 (21:17 +0000)]
Use pmap_preboot_map_attr() directly in arm_devmap_bootstrap()
instead of hiding behind pmap_map_chunk(). It's not longer needed
after old pmap-v6 code was removed.

For compatibility with __ARM_ARCH < 6, define PTE_DEVICE in devmap.c
file. Certainly, it would be nice if VM_MEMATTR_DEVICE could be used
even for __ARM_ARCH < 6.

8 years agoDeduplicate distrib-dirs logic from r289086 in distribution.
bdrewery [Tue, 2 Feb 2016 21:11:23 +0000 (21:11 +0000)]
Deduplicate distrib-dirs logic from r289086 in distribution.

Sponsored by: EMC / Isilon Storage Division

8 years agoMake pmap_preboot_map_attr() vm subsystem compliant, so its arguments
skra [Tue, 2 Feb 2016 21:10:55 +0000 (21:10 +0000)]
Make pmap_preboot_map_attr() vm subsystem compliant, so its arguments
do not depend on pmap internals. This is a preparation for hiding
internal pmap definitions as much as possible from the rest of system.

Simultaneously, the protection argument evaluation is fixed. Happily,
it did not effect the mappings. And it's the reason why it was not fixed
earlier.

8 years agoMFV r295109:
pfg [Tue, 2 Feb 2016 21:10:43 +0000 (21:10 +0000)]
MFV r295109:
Update openresolve to version 3.7.2

Relnotes: yes

8 years agoInclude virecover in vi package.
gjb [Tue, 2 Feb 2016 21:06:09 +0000 (21:06 +0000)]
Include virecover in vi package.

Submitted by: lidl
Sponsored by: The FreeBSD Foundation

8 years agoCreate ee(1) package.
gjb [Tue, 2 Feb 2016 21:04:33 +0000 (21:04 +0000)]
Create ee(1) package.

Sponsored by: The FreeBSD Foundation

8 years agoAdjust install .WAITs for lib/ and etc/ to allow parallelization more.
bdrewery [Tue, 2 Feb 2016 20:50:09 +0000 (20:50 +0000)]
Adjust install .WAITs for lib/ and etc/ to allow parallelization more.

Only 'installworld' needs to be protected and only when not using
-DNO_ROOT, which implies not installing to / and not needing the
lib dependency protections.

Sponsored by: EMC / Isilon Storage Division

8 years agoAdd order for installworld/distribution.
bdrewery [Tue, 2 Feb 2016 20:50:06 +0000 (20:50 +0000)]
Add order for installworld/distribution.

Sponsored by: EMC / Isilon Storage Division

8 years agoRoot out files that don't really belong here and could in fact screw
sobomax [Tue, 2 Feb 2016 19:04:40 +0000 (19:04 +0000)]
Root out files that don't really belong here and could in fact screw
you over if you happen to use git for FreeBSD development, as it is
the case with the unbound/.gitignore, which lits files that are
actually required for the buildworld.

MFC after: 1 day

8 years agoIncrease the size of PHYS_AVAIL_SIZE to allow firmware to provide a large
andrew [Tue, 2 Feb 2016 17:59:43 +0000 (17:59 +0000)]
Increase the size of PHYS_AVAIL_SIZE to allow firmware to provide a large
number of physical memory locations we can access. This is the case on
some HiKey boards that may have UEFI reserved memory dispersed through the
physical space.

Sponsored by: ABT Systems Ltd

8 years agoEnsure we don't overflow the phys_avail array. Some firmware may provide
andrew [Tue, 2 Feb 2016 17:57:15 +0000 (17:57 +0000)]
Ensure we don't overflow the phys_avail array. Some firmware may provide
more memory locations than we have space to record.

Sponsored by: ABT Systems Ltd

8 years agoCreate a package for autofs(5)
gjb [Tue, 2 Feb 2016 17:33:37 +0000 (17:33 +0000)]
Create a package for autofs(5)

Sponsored by: The FreeBSD Foundation

8 years agoCreate a package for vi(1) and related files.
gjb [Tue, 2 Feb 2016 16:47:50 +0000 (16:47 +0000)]
Create a package for vi(1) and related files.

Sponsored by: The FreeBSD Foundation

8 years agoIncrease the space we use after the kernel to 8MiB. On 2GiB HiKey board we
andrew [Tue, 2 Feb 2016 16:35:37 +0000 (16:35 +0000)]
Increase the space we use after the kernel to 8MiB. On 2GiB HiKey board we
would try to access data past this point stopping the boot.

Sponsored by: ABT Systems Ltd

8 years agoOnly look for the ranges property when we have children. This fixes booting
andrew [Tue, 2 Feb 2016 16:32:44 +0000 (16:32 +0000)]
Only look for the ranges property when we have children. This fixes booting
on systems with a gicv2, but no PCIe so no gicv2m.

Sponsored by: ABT Systems Ltd

8 years agoUse MIPS24K now.
adrian [Tue, 2 Feb 2016 16:25:53 +0000 (16:25 +0000)]
Use MIPS24K now.

Submitted by: Stanislav Galabov <sgalabov@gmail.com>
Differential Revision: https://reviews.freebsd.org/D5079

8 years agoUse CPU_MIPS24K now in AR933x based boards.
adrian [Tue, 2 Feb 2016 16:22:35 +0000 (16:22 +0000)]
Use CPU_MIPS24K now in AR933x based boards.

I'll flip on other boards as i test them.

Tested:

* AR9331, Carambola 2

8 years agoMove MIPS32 Release 2 and Release 3 CPUs to use the EHB instruction for
adrian [Tue, 2 Feb 2016 16:00:42 +0000 (16:00 +0000)]
Move MIPS32 Release 2 and Release 3 CPUs to use the EHB instruction for
clearing hazards.

This revision makes currently known MIPS32 Release 2 and Release 3 CPUs use
the EHB instruction when clearing hazards. So far the MIPS 74K and MIPS1004K
 (somewhat) were already using the EHB. Now we add more r2 and r3 CPUs to
this list.

Also, for the cases of MIPS coherent processing systems (currently 1004K,
1074K, interAptiv and proAptiv) - define proper CCA attributes.

Submitted by: Stanislav Galabov <sgalabov@gmail.com>
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D5078

8 years agoARM: All remaining functions in cpufunc_asm_arm10.S are identical with
mmel [Tue, 2 Feb 2016 14:53:34 +0000 (14:53 +0000)]
ARM: All remaining functions in cpufunc_asm_arm10.S are identical with
functions in cpufunc_asm_arm9.S. Use arm9 variants and remove
cpufunc_asm_arm10.S completly.

8 years agoMake dynamic link of libiconv from ports work again.
ume [Tue, 2 Feb 2016 11:51:18 +0000 (11:51 +0000)]
Make dynamic link of libiconv from ports work again.
The symbols of libiconv from ports were changed to
have prefixed.
Since we have iconv in our libc these days, we don't
need it on 10.X and later.  However, 9.X still need
this.

Spotted by: Yoshihiko Sarumaru
MFC after: 1 days

8 years agoUse LIBADD instead of LDADD.
hselasky [Tue, 2 Feb 2016 11:36:58 +0000 (11:36 +0000)]
Use LIBADD instead of LDADD.

Sponsored by: Mellanox Technologies

8 years agoARM: Remove last unused function, cpu_flush_prefetchbuf(),
mmel [Tue, 2 Feb 2016 10:50:32 +0000 (10:50 +0000)]
ARM: Remove last unused function, cpu_flush_prefetchbuf(),
from cpu_functions table.

8 years agoAdd suppor to loader.efi to load files off hte network. For this we need
andrew [Tue, 2 Feb 2016 10:39:18 +0000 (10:39 +0000)]
Add suppor to loader.efi to load files off hte network. For this we need
to open the device in exclusive mode as, without this, the firmware may
also be reading packets off the interface leading to a race.

Reviewed by: emaste
Sponsored by: ABT Systems Ltd
Differential Revision: https://reviews.freebsd.org/D4132

8 years agoRemove all remaining references to old and not more used struct
skra [Tue, 2 Feb 2016 10:32:45 +0000 (10:32 +0000)]
Remove all remaining references to old and not more used struct
pmap_devmap, pmap_devmap_bootstrap() and pmap_devmap[]. It was
replaced in r257660.

8 years agoImplement single stepping on arm64. We need to set the single step bits in
andrew [Tue, 2 Feb 2016 10:28:56 +0000 (10:28 +0000)]
Implement single stepping on arm64. We need to set the single step bits in
the processor and debug state registers. A flag has been added to the pcb
to tell us when to enable single stepping for a given thread.

Reviewed by: kib
Sponsored by: ABT Systems Ltd
Differential Revision: https://reviews.freebsd.org/D4730

8 years agoFix setting of protection bits for page table entries in pmap_map(). This
skra [Tue, 2 Feb 2016 10:17:51 +0000 (10:17 +0000)]
Fix setting of protection bits for page table entries in pmap_map(). This
function is only called from vm_page_startup() and vm_reserv_startup().
I.e. during vm subsystem initialization. As VM_PROT_WRITE is always
used in these calls, the typo did not have any effect. Likely, it's
the reason why it wasn't discovered so long.

8 years agoCorrectly handle the case where copystr(9) is given a string longer than
andrew [Tue, 2 Feb 2016 10:11:56 +0000 (10:11 +0000)]
Correctly handle the case where copystr(9) is given a string longer than
the passed in length. In this case we need to return ENAMETOOLONG.

8 years agoDocument our modified default value for PermitRootLogin.
des [Tue, 2 Feb 2016 10:02:38 +0000 (10:02 +0000)]
Document our modified default value for PermitRootLogin.

8 years agoRename some CPU_MIPSxxx options and add new CPU_MIPSxxx options
adrian [Tue, 2 Feb 2016 07:47:38 +0000 (07:47 +0000)]
Rename some CPU_MIPSxxx options and add new CPU_MIPSxxx options

This revision does the following renames:
CPU_MIPS24KC -> CPU_MIPS24K
CPU_MIPS74KC -> CPU_MIPS74K
CPU_MIPS1004KC -> CPU_MIPS1004K

It also adds the following new CPU_MIPSxxx options:
CPU_MIPS24KE, CPU_MIPS34K, CPU_MIPS1074K, CPU_INTERAPTIV, CPU_PROAPTIV

CPU_MIPSxxxxKC is limiting and possibly misleading as it implies the
MIPSxxxxK CPU has no FPU.
It would be better if the CPUs are named after their standard functionalities
only and the presence or absence of FPU can then be controlled via the
CPU_HAVEFPU option.

I will send out another dependent revision that moves MIPS 32 r2 and r3
CPUs to use the EHB instruction for clearing hazards instead of NOP/SSNOP.

Submitted by: Stanislav Galabov <sgalabov@gmail.com>
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D5077

8 years agoFix MFS builds when both MD_ROOT_SIZE and MFS_IMAGE are specified
adrian [Tue, 2 Feb 2016 07:02:51 +0000 (07:02 +0000)]
Fix MFS builds when both MD_ROOT_SIZE and MFS_IMAGE are specified

MD_ROOT_SIZE and embed_mfs.sh were basically retired as part of
https://reviews.freebsd.org/D2903 .
However, when building a kernel with 'options MD_ROOT_SIZE' specified, this
results in a non-working MFS, as within sys/dev/md/md.c we fall within the
wrong # ifdef.

This patch implements the following:

* Allow kernels to be built without the MD_ROOT_SIZE option, which results
  in a kernel built as per D2903.
* Allow kernels to be built with the MD_ROOT_SIZE option, which results
  in a kernel built similarly to the pre-D2903 way, with the following
  differences:
  * The MFS is now put in a separate section within the kernel (oldmfs,
    so it differs from the mfs section introduced by D2903).
  * embed_mfs.sh is changed, so it looks up the oldmfs section within the
    kernel, gets its size and offset, sees if the MFS will fit within the
    allocated oldmfs section and only if all is well does a dd of the MFS
    image into the kernel.

Submitted by: Stanislav Galabov <sgalabov@gmail.com>
Reviewed by: brooks, imp
Differential Revision: https://reviews.freebsd.org/D5093

8 years agoIncrease max allowed backlog for listen sockets
alfred [Tue, 2 Feb 2016 05:57:59 +0000 (05:57 +0000)]
Increase max allowed backlog for listen sockets
from short to int.

PR: 203922
Submitted by: White Knight <white_knight@2ch.net>
MFC After: 4 weeks

8 years agokcrypto_aes: Use separate sessions for AES and SHA1
cem [Tue, 2 Feb 2016 00:14:51 +0000 (00:14 +0000)]
kcrypto_aes: Use separate sessions for AES and SHA1

Some hardware supports AES acceleration but not SHA1, e.g., AES-NI
extensions.  It is useful to have accelerated AES even if SHA1 must be
software.

Suggested by: asomers
Reviewed by: asomers, dfr
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D5146

8 years agoAs it turns out, one of the more or less recent changes to em(4)
marius [Mon, 1 Feb 2016 23:51:30 +0000 (23:51 +0000)]
As it turns out, one of the more or less recent changes to em(4)
causes watchdog timeouts when using TSO4 at link speeds below
Gigabit, at least with 82573E. So disable the assist automatically
when at lower speeds.

Submitted by: jfv
Approved by: erj
Obtained from: D3162
MFC after: 3 days

8 years agoRestore the ABI of 'struct fpreg' on powerpc.
jhb [Mon, 1 Feb 2016 23:12:04 +0000 (23:12 +0000)]
Restore the ABI of 'struct fpreg' on powerpc.

The PT_{GET,SET}FPREGS requests use 'struct fpreg' and the NT_FPREGSET
core note stores a copy of 'struct fpreg'.  As with x86 and the floating
point state there compared to the extended state in XSAVE, struct fpreg
on powerpc now only holds the 'base' FP state, and setting it via
PT_SETFPREGS leaves the extended vector state in a thread unchanged.

Reviewed by: jhibbits
Differential Revision: https://reviews.freebsd.org/D5004

8 years agoRemove all stuff related to __ARM_ARCH >= 6 from pmap.h header except
skra [Mon, 1 Feb 2016 19:43:04 +0000 (19:43 +0000)]
Remove all stuff related to __ARM_ARCH >= 6 from pmap.h header except
for <machine/pmap-v6.h> include. It was used by old pmap-v6 code.

8 years agoRemove not needed <machine/pte.h> includes.
skra [Mon, 1 Feb 2016 19:36:33 +0000 (19:36 +0000)]
Remove not needed <machine/pte.h> includes.

8 years agoFix naming inconsistency with lib32 debug packages.
gjb [Mon, 1 Feb 2016 18:50:52 +0000 (18:50 +0000)]
Fix naming inconsistency with lib32 debug packages.

Sponsored by: The FreeBSD Foundation

8 years agoThese files were getting sys/malloc.h and vm/uma.h with header pollution
glebius [Mon, 1 Feb 2016 17:41:21 +0000 (17:41 +0000)]
These files were getting sys/malloc.h and vm/uma.h with header pollution
via sys/mbuf.h

8 years agoMFV r294821: 6529 Properly handle updates of variably-sized SA entries.
avg [Mon, 1 Feb 2016 15:40:40 +0000 (15:40 +0000)]
MFV r294821: 6529 Properly handle updates of variably-sized SA entries.

Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Ned Bass <bass6@llnl.gov>
Reviewed by: Tim Chase <tim@chase2k.com>
Approved by: Gordon Ross <gwr@nexenta.com>
Author: Andriy Gapon <avg@icyb.net.ua>

illumos/illumos-gate@e7e978b1f75353cb29673af9b35453c20c2827bf

During the update process in sa_modify_attrs(), the sizes of existing
variably-sized SA entries are obtained from sa_lengths[]. The case where
a variably-sized SA was being replaced neglected to increment the index
into sa_lengths[], so subsequent variable-length SAs would be rewritten
with the wrong length. This patch adds the missing increment operation
so all variably-sized SA entries are stored with their correct lengths.

Another problem was that index into attr_desc[] was increased even when
an attribute was removed. If that attribute was not the last attribute,
then the last attribute was lost.

8 years agoARM: Rename remaining instances of cpufunc_id() to cpu_ident(),
mmel [Mon, 1 Feb 2016 14:28:58 +0000 (14:28 +0000)]
ARM: Rename remaining instances of cpufunc_id() to cpu_ident(),
forgotten in r295096.
Remove tlb_flushI/tlb_flushI_SE functions forgotten in r295122.

8 years agoARM: Remove never used cpu_tlb_flushI and cpu_tlb_flushI_SE() functions
mmel [Mon, 1 Feb 2016 13:13:53 +0000 (13:13 +0000)]
ARM: Remove never used cpu_tlb_flushI and cpu_tlb_flushI_SE() functions
and their implementations.

8 years agoDelete argsize to fix a -Wunused-but-set-variable warning with gcc 4.9
ngie [Mon, 1 Feb 2016 08:06:17 +0000 (08:06 +0000)]
Delete argsize to fix a -Wunused-but-set-variable warning with gcc 4.9

The variable isn't actually checked -- just the end result which gets
returned from the function

Differential Revision: https://reviews.freebsd.org/D5156
Reviewed by: araujo, delphij
MFC after: 1 month
Sponsored by: EMC / Isilon Storage Division

8 years agoRemove `r_tmp` to fix a -Wunused-but-set-variable warning with gcc 4.9
ngie [Mon, 1 Feb 2016 07:15:31 +0000 (07:15 +0000)]
Remove `r_tmp` to fix a -Wunused-but-set-variable warning with gcc 4.9

MFC after: 1 month
Sponsored by: EMC / Isilon Storage Division

8 years agoAdd #include <string.h> to mute warning from clang/gcc about implicitly
ngie [Mon, 1 Feb 2016 07:09:08 +0000 (07:09 +0000)]
Add #include <string.h> to mute warning from clang/gcc about implicitly
declaring strcmp(3)

MFC after: 1 month
Reported by: Jenkins
Sponsored by: EMC / Isilon Storage Division

8 years agoUse the pidfile support added to ggated(8) in r294973 to ensure that the
ngie [Mon, 1 Feb 2016 06:27:59 +0000 (06:27 +0000)]
Use the pidfile support added to ggated(8) in r294973 to ensure that the
ggated(8) daemon used by the tests is the instance specifically invoked by
the tests instead of one or more daemon instances running on the system

MFC after: 1 month
Sponsored by: EMC / Isilon Storage Division

8 years agoAdd an additional 1 second sleep to after calling ggatec before calling
ngie [Mon, 1 Feb 2016 06:25:16 +0000 (06:25 +0000)]
Add an additional 1 second sleep to after calling ggatec before calling
dd to defeat a race when writing out to the geom_gate(4) device

This will quell the Jenkins failure emails until I come up with a better
solution

MFC after: 1 month
Reported by: Jenkins
Sponsored by: EMC / Isilon Storage Division

8 years agoClean up unused-but-set-variable spotted by gcc-4.9.
araujo [Mon, 1 Feb 2016 02:33:58 +0000 (02:33 +0000)]
Clean up unused-but-set-variable spotted by gcc-4.9.

Reviewed by: mav
Approved by: rodrigc (mentor)
MFC after: 2 weeks
Sponsored by: gandi.net
Differential Revision: https://reviews.freebsd.org/D5109

8 years agoClean up unused-but-set-variable spotted by gcc-4.9.
araujo [Mon, 1 Feb 2016 02:31:59 +0000 (02:31 +0000)]
Clean up unused-but-set-variable spotted by gcc-4.9.

Reviewed by: mav, slm
Approved by: rodrigc (mentor)
MFC after: 2 weeks
Sponsored by: gandi.net

8 years agoUse the correct type to pmap_mapdev() in nexus_activate_resource().
jhibbits [Mon, 1 Feb 2016 02:04:40 +0000 (02:04 +0000)]
Use the correct type to pmap_mapdev() in nexus_activate_resource().

pmap_mapdev() takes vm_paddr_t, which may be sized differently from vm_offset_t,
as it is in book-e.

Sponsored by: Alex Perez/Inertial Computing

8 years agoUtilize new `-v var_to_set' of f_snprintf()
dteske [Mon, 1 Feb 2016 00:54:26 +0000 (00:54 +0000)]
Utilize new `-v var_to_set' of f_snprintf()

8 years agoMove awk(1)-dependent recipes to the bottom
dteske [Sun, 31 Jan 2016 21:34:25 +0000 (21:34 +0000)]
Move awk(1)-dependent recipes to the bottom

8 years agoMove f_isinteger() to the top
dteske [Sun, 31 Jan 2016 21:33:24 +0000 (21:33 +0000)]
Move f_isinteger() to the top

Grouping builtins-only algos together

8 years agoMove f_vsprintf() below f_sprintf()
dteske [Sun, 31 Jan 2016 21:31:24 +0000 (21:31 +0000)]
Move f_vsprintf() below f_sprintf()

Variable argument versions grouped with standard versions

8 years agoMove f_sprintf() above f_snprintf()
dteske [Sun, 31 Jan 2016 21:30:02 +0000 (21:30 +0000)]
Move f_sprintf() above f_snprintf()

Ordering functions by appearance of use

8 years agoOptimize f_substr() to use built-ins only
dteske [Sun, 31 Jan 2016 21:28:41 +0000 (21:28 +0000)]
Optimize f_substr() to use built-ins only

Change f_snprintf() to use optimzed f_substr()

8 years agoOptimize f_sprintf() for bash
dteske [Sun, 31 Jan 2016 21:22:10 +0000 (21:22 +0000)]
Optimize f_sprintf() for bash

bash lacks the ksh93 optimization that makes sub-shells fast if they do
not alter io. bash 3.1-alpha1 introduced printf -v var_to_set which is not
as fast but is still significantly faster than var_to_set=$( printf ) when
using any version of bash. If we find our interpreter to somehow be bash
by invocation or inclusion, use the feature that provides fastest results.

8 years agoReset OPTIND to 1 in f_device_find()
dteske [Sun, 31 Jan 2016 21:14:31 +0000 (21:14 +0000)]
Reset OPTIND to 1 in f_device_find()

8 years agoAdd make universe targets "kernels" and "worlds".
ian [Sun, 31 Jan 2016 17:32:58 +0000 (17:32 +0000)]
Add make universe targets "kernels" and "worlds".

"make kernels" is now shorthand for "make universe -DMAKE_JUST_KERNELS"
"make worlds"  is now shorthand for "make universe -DMAKE_JUST_WORLDS"

The kernels target includes modules (unless you add -DNO_MODULES).

And of course you can still add all the other universe options, such as
"make kernels TARGETS=arm" to build kernels for all arm arches, or
TARGET_ARCH=armv6 to build all armv6 kernels, etc.

Reviewed by: imp

8 years agoFix the logic in the ddb command 'show ktr /a'. Prior to r118269 it would
andrew [Sun, 31 Jan 2016 17:32:20 +0000 (17:32 +0000)]
Fix the logic in the ddb command 'show ktr /a'. Prior to r118269 it would
print until cncheckc returned a non -1, i.e. a character had been entered.
After this change it would print only if cncheckc returned a character.
As this was before each call to db_mach_vtrace the normal outcome was
nothing was printed.

With this change 'show ktr /a' will now keep printing until the user stops
the command with a key press, or there is no more entries to print.

8 years agoARM: Fix END() symbol for cpu_ident function. I forgot to rename it
mmel [Sun, 31 Jan 2016 16:55:52 +0000 (16:55 +0000)]
ARM: Fix END() symbol for cpu_ident function. I forgot to rename it
in r295096.

8 years agoARM: cpufunc_domains, cpufunc_faultstatus and cpufunc_faultaddress
mmel [Sun, 31 Jan 2016 16:34:06 +0000 (16:34 +0000)]
ARM: cpufunc_domains, cpufunc_faultstatus and cpufunc_faultaddress
functions are equal for all ARM variants. Remove them from cpu_functions
table.

8 years agoARM: Next round of cpufunc.* cleaning. Nobody uses flush_brnchtgt* functions,
mmel [Sun, 31 Jan 2016 15:36:13 +0000 (15:36 +0000)]
ARM: Next round of cpufunc.* cleaning. Nobody uses flush_brnchtgt* functions,
delete them.

8 years agoFix ixgbe flow control autoneg reporting
smh [Sun, 31 Jan 2016 15:18:03 +0000 (15:18 +0000)]
Fix ixgbe flow control autoneg reporting

Fix ixgbe reporting of flow control autoneg when running under DBG 1

Reviewed by: erj
MFC after: 2 days
Sponsored by: Multiplay
Differential Revision: https://reviews.freebsd.org/D5089

8 years agoConfigure ixgbe phy & gbic power
smh [Sun, 31 Jan 2016 15:14:23 +0000 (15:14 +0000)]
Configure ixgbe phy & gbic power

Setup phy and gbic power as per Linux 4.3.13 driver.

This fixes link not detected on X540-AT2 after booting to Linux which turns
the phy power off on detach.

Reviewed by: sbruno
MFC after: 2 days
Sponsored by: Multiplay
Differential Revision: https://reviews.freebsd.org/D5107

8 years agoARM: First round of cpufunc.* cleaning. All abort_fixup functions are
mmel [Sun, 31 Jan 2016 13:59:16 +0000 (13:59 +0000)]
ARM: First round of cpufunc.* cleaning. All abort_fixup functions are
not currently used or defined. Delete them.

8 years agoARM: Rename ARM specific VM_MEMATTR_WT memory attribute to standard one.
mmel [Sun, 31 Jan 2016 09:16:20 +0000 (09:16 +0000)]
ARM: Rename ARM specific VM_MEMATTR_WT memory attribute to standard one.

8 years agoARM: Convert spaces to tabs, fix formatting.
mmel [Sun, 31 Jan 2016 08:53:53 +0000 (08:53 +0000)]
ARM: Convert spaces to tabs, fix formatting.
Not a functional change.

8 years agoARM: Next round of cleanup in swtch-v*.S.
mmel [Sun, 31 Jan 2016 08:06:22 +0000 (08:06 +0000)]
ARM: Next round of cleanup in swtch-v*.S.
 - remove now useless #if __ARM_ARCH conditional
 - use macro for accessing CP15 registers
 - remove unused PCPU_SIZE

Pointed by: kib

8 years agoImplement power command to list all power modes, find out the power
imp [Sat, 30 Jan 2016 22:48:06 +0000 (22:48 +0000)]
Implement power command to list all power modes, find out the power
mode we're in and to set the power mode.

8 years agoMake pfctl(8) work on strict-alignment platforms, by copying a pair of
ian [Sat, 30 Jan 2016 22:03:14 +0000 (22:03 +0000)]
Make pfctl(8) work on strict-alignment platforms, by copying a pair of
embedded structures out of a packed, unaligned struct into local copies
on the stack which are aligned.

The original patch to do this was submitted by Guy Yur <guyyur@gmail.com>,
and this is conceptually the same change, but restructured with the
#ifndef __NO_STRICT_ALIGNMENT wrapper, similar to how the same issue is
handled in the kernel pf code.

PR: 185617
PR: 206658

8 years agosh: Don't allocate a redirtab if there are no redirections.
jilles [Sat, 30 Jan 2016 21:21:25 +0000 (21:21 +0000)]
sh: Don't allocate a redirtab if there are no redirections.

Builtins (including variable assignments without command word), function
calls and redirected compound commands need to restore file descriptors
to their original state after execution. This is handled by allocating a
redirtab structure. These mallocs and frees show up heavily in pmcstat.

Only allocate a redirtab if there are actually redirections and maintain a
count of how many levels of REDIR_PUSH there are without redirtabs.

A simple loop without external programs like

sh -c 'i=0; w=$(printf %0100d 7); while [ "$i" -lt 1000000 ]; do
    i=$((i+1)); done'

is over 25% faster on an amd64 bhyve VM.

8 years agosh(1): Document 'cd -'.
jilles [Sat, 30 Jan 2016 20:10:20 +0000 (20:10 +0000)]
sh(1): Document 'cd -'.

This reflects the changes in r294649 and can therefore not be MFCed by
itself.

8 years agotest: Optimize operator lookup.
jilles [Sat, 30 Jan 2016 19:59:58 +0000 (19:59 +0000)]
test: Optimize operator lookup.

The linear search using strcmp() shows up in pmcstat for several percent.

Split the operators into lengths and whether they start with '-' and compare
bytes using == instead of strcmp().

A simple test

sh -c 'i=0; w=$(printf %0100d 7); while [ "$i" -lt 1000000 ]; do
    v=$(printf %sx%s "$w" "$w"); i=$((i+1)); done'

is over 4% faster on an amd64 bhyve VM.

8 years agoUse the correct type for i when iterating over `buf` to avoid unlikely
ngie [Sat, 30 Jan 2016 18:33:23 +0000 (18:33 +0000)]
Use the correct type for i when iterating over `buf` to avoid unlikely
negative array indexing in iicrdwr(..)

Differential Revision: https://reviews.freebsd.org/D5132
Obtained from: HardenedBSD
PR: 206754
Reported by: CTurt <cturt@hardenedbsd.org>
Submitted by: Madhi Moktari <mokhi64@gmail.com>
Sponsored by: EMC / Isilon Storage Division

8 years agoFix the type for hw.ncpu, so sysctlbyname doesn't consistently fail on
ngie [Sat, 30 Jan 2016 17:54:18 +0000 (17:54 +0000)]
Fix the type for hw.ncpu, so sysctlbyname doesn't consistently fail on
64-bit architectures where sizeof(int) != sizeof(size_t).

MFC after: 1 week
PR: 206758
Reported by: Christoph Schönweiler <public2016@hauptsignal.at>
Submitted by: kib
Sponsored by: EMC / Isilon Storage Division

8 years agoAdd missing parentheses. This was reported by ccaughie via GitHub
tuexen [Sat, 30 Jan 2016 17:32:46 +0000 (17:32 +0000)]
Add missing parentheses. This was reported by ccaughie via GitHub
for the userland stack.

MFC after: 3 days

8 years agoRevert r295062 to unbreak buildworld
ngie [Sat, 30 Jan 2016 17:10:14 +0000 (17:10 +0000)]
Revert r295062 to unbreak buildworld

Some of the structures referenced in power.c (in particular
struct nvme_power_state) are missing from sbin/nvmecontrol/

Pointyhat to: imp
Reported by: Jenkins [*], O. Hartmann <ohartman@zedat.fu-berlin.de>, Outback Dingo <outbackdingo@gmail.com>

8 years agoUpdate the path mtu when turning on/off UDP encapsulation for SCTP.
tuexen [Sat, 30 Jan 2016 16:56:39 +0000 (16:56 +0000)]
Update the path mtu when turning on/off UDP encapsulation for SCTP.

MFC after: 3 days

8 years agoThe zfsboot automated part of bsdinstall now supports UEFI
allanjude [Sat, 30 Jan 2016 15:53:28 +0000 (15:53 +0000)]
The zfsboot automated part of bsdinstall now supports UEFI

MFC after: 3 days
Sponsored by: ScaleEngine Inc.
Differential Revision: https://reviews.freebsd.org/D4960

8 years agoARM: Remove TLB IPI.
mmel [Sat, 30 Jan 2016 13:11:13 +0000 (13:11 +0000)]
ARM: Remove TLB IPI.
We don't support SMP on ARMv6. All ARMv7 multicore cpus already uses
hardware broadcast for TLB and cache operations.

8 years agoDon't allow a remote encapsulation port change during the
tuexen [Sat, 30 Jan 2016 12:58:38 +0000 (12:58 +0000)]
Don't allow a remote encapsulation port change during the
SCTP restart procedure.

MFC after: 3 days

8 years agoARM: Cleanup mp_machdep.c. SMP is supported only on ARMv6 and later.
mmel [Sat, 30 Jan 2016 12:23:28 +0000 (12:23 +0000)]
ARM: Cleanup mp_machdep.c. SMP is supported only on ARMv6 and later.

8 years agoDon't change the remote UDP encapsulation port for SCTP packets
tuexen [Sat, 30 Jan 2016 11:10:22 +0000 (11:10 +0000)]
Don't change the remote UDP encapsulation port for SCTP packets
containing an INIT chunk.

MFC after: 3 days

8 years agoIgnore peer addresses in a consistent way also when checking for
tuexen [Sat, 30 Jan 2016 10:39:05 +0000 (10:39 +0000)]
Ignore peer addresses in a consistent way also when checking for
new addresses during restart. If this is not done, restart doesn't
work when the local socket is IPv4 only and the peer uses
IPv4 and IPv6 addresses.

MFC after: 3 days.

8 years agoARM: Don't misuse ARM_TP_ADDRESS as ARMv4 / ARMv6 selector.
mmel [Sat, 30 Jan 2016 10:10:29 +0000 (10:10 +0000)]
ARM: Don't misuse ARM_TP_ADDRESS as ARMv4 / ARMv6 selector.

8 years agoEHCI: Correct address of EHCI_USBMODE_LPM register is 0xC8, not 0xA8.
mmel [Sat, 30 Jan 2016 08:27:09 +0000 (08:27 +0000)]
EHCI: Correct address of EHCI_USBMODE_LPM register is 0xC8, not 0xA8.

8 years agoARM: Split swtch.S into common, ARMv4 and ARMv6 parts. Cleanup them.
mmel [Sat, 30 Jan 2016 08:02:12 +0000 (08:02 +0000)]
ARM: Split swtch.S into common, ARMv4 and ARMv6 parts. Cleanup them.

8 years agoPreliminary EFI support. Based, in part, on patches from Andy Turner.
imp [Sat, 30 Jan 2016 07:00:36 +0000 (07:00 +0000)]
Preliminary EFI support. Based, in part, on patches from Andy Turner.

Add support for being able to boot off both UEFI and BIOS firmware,
ala the memstick trick.

Add support for writing to GPT volumes.

Move away from using bsd labels at all for these embedded stuff.

Minor tweaks to README.

8 years agoTwo new variables: NANO_ROOT and NANO_ALTROOT. These used to be
imp [Sat, 30 Jan 2016 07:00:29 +0000 (07:00 +0000)]
Two new variables: NANO_ROOT and NANO_ALTROOT. These used to be
spelled ${NANO_SLICE_ROOT}a and ${NANO_SLICE_ALTROOT}a respectively,
and that's the default value. This will allow nanobsd on systems
without a bsd label. That's rarely needed these days, even in an MBR
world. The default will shift to this in the future, but remain an
option.

8 years agoTwo new config files. One that has UEFI booting, and the other that
imp [Sat, 30 Jan 2016 07:00:28 +0000 (07:00 +0000)]
Two new config files. One that has UEFI booting, and the other that
can do both UEFI and BIOS/GPT booting. Support for nanobsd coming
soon.

Based in part in a patch from: andrew@

8 years agoImplement power command to list all power modes, find out the power
imp [Sat, 30 Jan 2016 06:18:37 +0000 (06:18 +0000)]
Implement power command to list all power modes, find out the power
mode we're in and to set the power mode.

8 years agoThis seems like a very trivial bug that should have been squashed a long
sobomax [Sat, 30 Jan 2016 04:16:05 +0000 (04:16 +0000)]
This seems like a very trivial bug that should have been squashed a long
time ago, but for some reason it was not. Basically, without this change
dlopen(3)'ing an empty .so file would just cause application to dump core
with SIGSEGV.

Make sure the file has enough data for at least the ELF header before
mmap'ing it.

Add a test case to check that dlopen an empty file return an error.

There were a separate discussion as to whether it should be SIGBUS
instead when you try to access region mapped from an empty file,
but it's definitely SIGSEGV now, so if anyone want to check that please
be my guest.
Reviewed by: mjg, cem
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D5112

8 years agoFix periodic(8) and rc(8) script inclusion to rcmds package.
gjb [Sat, 30 Jan 2016 01:52:18 +0000 (01:52 +0000)]
Fix periodic(8) and rc(8) script inclusion to rcmds package.

Sponsored by: The FreeBSD Foundation

8 years agoAdd a SYSDECODE_ABI_ prefix to the ABI enums to avoid potential collisions.
jhb [Sat, 30 Jan 2016 01:00:54 +0000 (01:00 +0000)]
Add a SYSDECODE_ABI_ prefix to the ABI enums to avoid potential collisions.

Suggested by: jmallett
Reviewed by: bdrewery, jmallett
Differential Revision: https://reviews.freebsd.org/D5123

8 years agoWrap long lines after recent commits.
gjb [Fri, 29 Jan 2016 21:42:27 +0000 (21:42 +0000)]
Wrap long lines after recent commits.

Sponsored by: The FreeBSD Foundation

8 years agoMake sure 'pkg config ABI' uses ABI_FILE for the target.
gjb [Fri, 29 Jan 2016 21:39:44 +0000 (21:39 +0000)]
Make sure 'pkg config ABI' uses ABI_FILE for the target.

Sponsored by: The FreeBSD Foundation