andrew [Fri, 17 Apr 2015 09:17:35 +0000 (09:17 +0000)]
Remove support for reading the syscall code in OABI. This is unneeded now
we can only build for EABI.
andrew [Fri, 17 Apr 2015 09:14:58 +0000 (09:14 +0000)]
Use cp15_ifar_get to get the instruction fault address. When using Thumb-2
the instruction may be over two pages so the program counter could point
to the wrong page.
hselasky [Fri, 17 Apr 2015 07:11:10 +0000 (07:11 +0000)]
Build the USB DisplayLink driver by default.
hselasky [Fri, 17 Apr 2015 07:07:06 +0000 (07:07 +0000)]
Buffers which can be memory mapped into userspace should never be
freed. Recycle the buffers instead. This patch also fixes a panic at
reboot issue when an UDL adapter is attached to the system.
glebius [Fri, 17 Apr 2015 06:39:15 +0000 (06:39 +0000)]
Bring in if_types.h from projects/ifnet, where types are
defined in enum.
glebius [Fri, 17 Apr 2015 06:38:31 +0000 (06:38 +0000)]
- Format copyright notices, VCS ids.
- Run through unifdef(1).
loos [Fri, 17 Apr 2015 03:56:50 +0000 (03:56 +0000)]
Fix the 'wrong packet header' errors for if_emac.
Do not strip the ethernet CRC until we read all data from FIFO, otherwise
the CRC bytes would be left in FIFO causing the failure of next packet
(wrong packet header).
When this error happens the receiver has to be disabled and the RX FIFO
flushed, discarding valid packets.
With this fix if_emac behaves a lot better.
neel [Thu, 16 Apr 2015 22:44:51 +0000 (22:44 +0000)]
Relax the check on which vectors can be delivered through the APIC. According
to the Intel SDM vectors 16 through 255 are allowed to be delivered via the
local APIC.
Reported by: Leon Dang (ldang@nahannisys.com)
MFC after: 2 weeks
emaste [Thu, 16 Apr 2015 22:35:19 +0000 (22:35 +0000)]
Add arm64 to universe if binutils is available.
arm64 relies on an external binutils port or package right now, because
the in-tree linker from binutils 2.17.50 does not support arm64. Add
arm64 to universe if the linker is available. If not output a message
that arm64 is skipped.
buildworld and buildkernel use the external binutils automatically, so
it's sufficient to run 'pkg install aarch64-binutils' to build
FreeBSD/arm64.
Differential Revision: https://reviews.freebsd.org/D2302
Reviewed by: andrew, imp
Sponsored by: The FreeBSD Foundation
rmacklem [Thu, 16 Apr 2015 22:35:15 +0000 (22:35 +0000)]
mav@ has found that NFS servers exporting ZFS file systems
can perform better when using a 128K read/write data size.
This patch changes NFS_MAXDATA from 64K to 128K so that
clients can use 128K for NFS mounts to allow this.
The patch also renames NFS_MAXDATA to NFS_SRVMAXIO so
that it is clear that it applies to the NFS server side
only. It also avoids a name conflict with the NFS_MAXDATA
defined in rpcsvc/nfs_prot.h, that is used for userland RPC.
Tested by: mav
Reviewed by: mav
MFC after: 2 weeks
emaste [Thu, 16 Apr 2015 22:34:10 +0000 (22:34 +0000)]
Fix kernel build ${MACHINE} path
$M should be the kernel machine src directory, ${MACHINE}. In most cases
${MACHINE} and ${MACHINE_CPUARCH} are the same, but this is not true for
pc98 and arm64.
It appears we previously set M=${MACHINE_CPUARCH} as a workaround to
accommodate pc98, where MACHINE_CPUARCH is pc98 but it uses
sys/i386/i386/genassym.c.
arm64 relies on this being set correctly, so update $M and add explicit
workarounds for pc98.
Differential Revision: https://reviews.freebsd.org/D2307
Reviewed by: andrew, imp
Sponsored by: The FreeBSD Foundation
delphij [Thu, 16 Apr 2015 22:30:57 +0000 (22:30 +0000)]
r281540 was upstreamed as NetBSD r1.108 of gzip.c, note it as merged.
allanjude [Thu, 16 Apr 2015 22:09:37 +0000 (22:09 +0000)]
Fix libxo output from uptime command
the libxo output for uptime returned multiple 'uptime' keys, one each for number of days, hours, and minutes of uptime.
This is invalid JSON.
This patch makes the output the raw number of seconds, as well as adding keys for the individual unit values
A string of the original output from the plain-text uptime command is also added
Differential Revision: https://reviews.freebsd.org/D2063
Reviewed by: jmg
Approved by: marcel
Sponsored by: ScaleEngine Inc.
ngie [Thu, 16 Apr 2015 21:45:07 +0000 (21:45 +0000)]
Defeat race with MK_KERBEROS == yes introduced with bootstrap-tools
parallelization work done in r279197
- kerberos5/lib/libroken requires kerberos5/tools/make-roken to build
- kerberos5/tools/asn1_compile, kerberos5/tools/slc, and usr.bin/compile_et
require kerberos5/lib/libroken and kerberos5/lib/libvers
This race is incredibly evident when cross-building sparc64 on
ref10-amd64.freebsd.org
MFC after: 1 week
Pointyhat to: ngie
bdrewery [Thu, 16 Apr 2015 21:44:35 +0000 (21:44 +0000)]
Fix SIGINFO race causing final results to be lost to stderr.
If a SIGINFO comes in after the file is read then the 'siginfo' flag is set to
1 and the next call to show_cnt() (at exit) would print the data to stderr
rather than the expected stdout.
This was found with spamming Poudriere with SIGINFO which caused a 'wc -l'
execution to return no data rather than an expected number.
MFC after: 2 weeks
dteske [Thu, 16 Apr 2015 20:53:15 +0000 (20:53 +0000)]
Add "GELI Passphrase:" prompt to boot loader.
A new loader.conf(5) option of geom_eli_passphrase_prompt="YES" will now
allow you to enter your geli(8) root-mount credentials prior to invoking
the kernel.
See check-password.4th(8) for details.
Differential Revision: https://reviews.freebsd.org/D2105
Reviewed by: imp, kmoore
Discussed on: -current
MFC after: 3 days
X-MFC-to: stable/10
Relnotes: yes
imp [Thu, 16 Apr 2015 20:50:37 +0000 (20:50 +0000)]
People are still getting burned by the byacc upgraded, switch to
always doing byacc until someone figures out the more nuanced version
to switch off of.
glebius [Thu, 16 Apr 2015 20:23:50 +0000 (20:23 +0000)]
Remove empty now directory.
glebius [Thu, 16 Apr 2015 20:22:40 +0000 (20:22 +0000)]
Move ALTQ from contrib to net/altq. The ALTQ code is for many years
discontinued by its initial authors. In FreeBSD the code was already
slightly edited during the pf(4) SMP project. It is about to be edited
more in the projects/ifnet. Moving out of contrib also allows to remove
several hacks to the make glue.
Reviewed by: net@
neel [Thu, 16 Apr 2015 20:15:47 +0000 (20:15 +0000)]
Prefer 'vcpu_should_yield()' over checking 'curthread->td_flags' directly.
MFC after: 1 week
neel [Thu, 16 Apr 2015 20:11:49 +0000 (20:11 +0000)]
If the number of guest vcpus is less than '1' then flag it as an error.
MFC after: 1 week
emaste [Thu, 16 Apr 2015 19:23:08 +0000 (19:23 +0000)]
Set MACHINE_ARCH to aarch64 for arm64
Reviewed by: imp
Sponsored by: The FreeBSD Foundation
rodrigc [Thu, 16 Apr 2015 17:42:52 +0000 (17:42 +0000)]
In the version of gcc in the FreeBSD tree, this modification was made to
the compiler in svn r242182:
#if STDC_HOSTED
#include <mm_malloc.h>
#endif
A similar change was done to clang in the FreeBSD tree in svn r218893:
However, for external gcc toolchains, this patch is not in the compiler's header
file.
This patch to FreeBSD's aesni code allows compilation with an external
gcc toolchain.
Differential Revision: https://reviews.freebsd.org/D2285
Reviewed by: jmg, dim
Approved by: dim
brooks [Thu, 16 Apr 2015 15:35:17 +0000 (15:35 +0000)]
Fix a minor function definition inconsistancy.
MFC after: 3 days
brooks [Thu, 16 Apr 2015 15:34:22 +0000 (15:34 +0000)]
Make it harder to specify invalid LIBADD by causing values without
corresponding DPADD_<lib> variables to produce a useful error message.
Differential Revision: https://reviews.freebsd.org/D2295
Reviewed by: bapt
Sponsored by: DARPA, AFRL
jhb [Thu, 16 Apr 2015 12:58:51 +0000 (12:58 +0000)]
Remove THRMISC_VERSION. The thrmisc structure doesn't include a version
number, so this wasn't used (and can't easily be added). If at some point
we want to extend thrmisc, we will probably need to just add a new note
type and ensure that the new type includes a version number.
Discussed with: kib
MFC after: 2 weeks
emaste [Thu, 16 Apr 2015 12:54:28 +0000 (12:54 +0000)]
compiler_rt: add floatunsitf for arm64
It provides unsigned integer to quad-precision conversion.
Sponsored by: The FreeBSD Foundation
jch [Thu, 16 Apr 2015 10:00:06 +0000 (10:00 +0000)]
Fix an old and well-documented use-after-free race condition in
TCP timers:
- Add a reference from tcpcb to its inpcb
- Defer tcpcb deletion until TCP timers have finished
Differential Revision: https://reviews.freebsd.org/D2079
Submitted by: jch, Marc De La Gueronniere <mdelagueronniere@verisign.com>
Reviewed by: imp, rrs, adrian, jhb, bz
Approved by: jhb
Sponsored by: Verisign, Inc.
kevlo [Thu, 16 Apr 2015 07:40:01 +0000 (07:40 +0000)]
Enable LDO to 2.5V before efuse r/w action in order to prevent
incorrect mac address read from efuse.
Reported by: swills
Tested by: rpaulo and myself on RPi
tijl [Thu, 16 Apr 2015 07:17:00 +0000 (07:17 +0000)]
Fix build after r281550 when WITHOUT_ICONV is defined.
Reported by: adrian
MFC after: 2 weeks
ngie [Thu, 16 Apr 2015 03:35:47 +0000 (03:35 +0000)]
Fix race when testing for ETXTBSY writing to ${n0} (process image) by making
sure the process has been started beforehand with pgrep
pkill the process afterwards to make sure it's dead when the unlink is run
(not strictly required, but I was being conservative)
MFC after: 1 week
Reviewed by: Darius O'Conner, mjohnston
Sponsored by: EMC / Isilon Storage Division
araujo [Thu, 16 Apr 2015 02:44:37 +0000 (02:44 +0000)]
Remove duplicate header entry.
bdrewery [Thu, 16 Apr 2015 02:24:40 +0000 (02:24 +0000)]
Remove extra flags from r250462.
MFC after: 1 week
emaste [Thu, 16 Apr 2015 01:47:05 +0000 (01:47 +0000)]
vidcontrol: make size argument optional again for syscons
r273544 changed the -f option allow no arguments in vt mode (used to
reset the font back to the default), but broke the optionality of the
size argument for syscons. Drop the required argument from syscons'
optstring for -f so the optional argument handler works the same way
for both syscons and vt.
Reported by: bde
Sponsored by: The FreeBSD Foundation
delphij [Wed, 15 Apr 2015 21:48:06 +0000 (21:48 +0000)]
Verify if the saved hostid is still the same and update if
it was changed.
Sponsored by: iXsystems, Inc.
Obtained from: FreeNAS (trueos commit 0abb740)
allanjude [Wed, 15 Apr 2015 20:55:43 +0000 (20:55 +0000)]
Fix syntax errors in conditions for new features in freebsd-update
Differential Revision: https://reviews.freebsd.org/D1550
Submitted by: kmoore
Approved by: delphij
Obtained from: PCBSD
MFC after: 1 week
X-MFC-With: 279571
Sponsored by: ScaleEngine Inc.
rmacklem [Wed, 15 Apr 2015 20:16:31 +0000 (20:16 +0000)]
File systems that do not use the buffer cache (such as ZFS) must
use VOP_FSYNC() to perform the NFS server's Commit operation.
This patch adds a mnt_kern_flag called MNTK_USES_BCACHE which
is set by file systems that use the buffer cache. If this flag
is not set, the NFS server always does a VOP_FSYNC().
This should be ok for old file system modules that do not set
MNTK_USES_BCACHE, since calling VOP_FSYNC() is correct, although
it might not be optimal for file systems that use the buffer cache.
Reviewed by: kib
MFC after: 2 weeks
tychon [Wed, 15 Apr 2015 18:49:03 +0000 (18:49 +0000)]
Prior to aborting due to an ioport error, it is always interesting to
see what the guest's %rip is.
Reviewed by: grehan
neel [Wed, 15 Apr 2015 16:22:05 +0000 (16:22 +0000)]
Fix handling of BUS_PROBE_NOWILDCARD in 'device_probe_child()'.
Device probe value of BUS_PROBE_NOWILDCARD should be treated specially only
if the device has a fixed devclass. Otherwise it should be interpreted just
as if the driver doesn't want to claim the device.
Prior to this change a device that was not claimed explicitly by its driver
would remain "attached" to the driver that returned BUS_PROBE_NOWILDCARD.
This would bump up the reference on 'driver->refs' and its 'dev->ops' would
point to the 'driver->ops'. When the driver is subsequently unloaded the
'dev->ops->cls' is left pointing to freed memory.
This fixes an easily reproducible #GP fault caused by loading and unloading
vmm.ko multiple times.
Differential Revision: https://reviews.freebsd.org/D2294
Reviewed by: imp, jhb
Discussed with: rstone
Reported by: Leon Dang (ldang@nahannisys.com)
MFC after: 2 weeks
gnn [Wed, 15 Apr 2015 14:46:45 +0000 (14:46 +0000)]
Minor change to the macros to make sure that if an AF is passed that is neither AF_INET6 nor AF_INET that we don't touch random bits of memory.
Differential Revision: https://reviews.freebsd.org/D2291
andrew [Wed, 15 Apr 2015 14:30:07 +0000 (14:30 +0000)]
Enter a critical section when storing the vfp registers, we don't want to
be preempted here as this will enter back into this function, but the
hardware could be in an inconsistant state, and the vfp unit will be off
when switced back to this function.
Sponsored by: The FreeBSD Foundation
andrew [Wed, 15 Apr 2015 14:20:12 +0000 (14:20 +0000)]
Use the correct value to get the offset of the objects tls data.
Sponsored by: The FreeBSD Foundation
andrew [Wed, 15 Apr 2015 14:18:25 +0000 (14:18 +0000)]
Ensure the userland thread and floating-point state has been saved before
copying the pcb. These values may have been changed just before the call
to fork and without a call to cpu_switch, where they would have been saved.
Sponsored by: The FreeBSD Foundation
tijl [Wed, 15 Apr 2015 09:39:52 +0000 (09:39 +0000)]
Point to the right location where __FreeBSD_version numbers are documented.
trasz [Wed, 15 Apr 2015 09:13:11 +0000 (09:13 +0000)]
Rewrite linprocfs_domtab() as a wrapper around kern_getfsstat(). This
adds missing jail and MAC checks.
Differential Revision: https://reviews.freebsd.org/D2193
Reviewed by: kib@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
tijl [Wed, 15 Apr 2015 09:09:20 +0000 (09:09 +0000)]
Remove the const qualifier from iconv(3) to comply with POSIX:
http://pubs.opengroup.org/onlinepubs/
9699919799/functions/iconv.html
Adjust all code that calls iconv.
PR: 199099
Exp-run by: antoine
MFC after: 2 weeks
kib [Wed, 15 Apr 2015 08:16:34 +0000 (08:16 +0000)]
Implement support -z global linker option. It marks the shared object
as always participating in the global symbols namespace, regardless of
the way the object was brought into the process address space.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
kib [Wed, 15 Apr 2015 08:13:53 +0000 (08:13 +0000)]
Implement support for binary to requesting specific stack size for the
initial thread. It is read by the ELF image activator as the virtual
size of the PT_GNU_STACK program header entry, and can be specified by
the linker option -z stack-size in newer binutils.
The soft RLIMIT_STACK is auto-increased if possible, to satisfy the
binary' request.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
bapt [Wed, 15 Apr 2015 06:57:47 +0000 (06:57 +0000)]
Correctly set LC_COLLATE into setenv
Submitted by: jbeich
rpaulo [Wed, 15 Apr 2015 05:24:39 +0000 (05:24 +0000)]
snd_hda: add support for the Lenovo X1 20BS model.
This requires a patch to redirect the output to a separate DAC when
the headphones are used. While there, add device strings for Intel
Broadwell HDA controllers and Realtek ALC292 codecs.
MFC after: 1 week
neel [Wed, 15 Apr 2015 05:04:42 +0000 (05:04 +0000)]
Initialize 'error' before use.
Reported by: Coverity Scan
CID: 1249748, 1249747, 1249751, 1249749
MFC after: 1 week
adrian [Wed, 15 Apr 2015 00:57:21 +0000 (00:57 +0000)]
Fix RSS build - netisr input / NETISR_IP_DIRECT is used here.
delphij [Wed, 15 Apr 2015 00:07:21 +0000 (00:07 +0000)]
When reading in the original file name from gzip header, we read
in PATH_MAX + 1 bytes from the file. In r281500, strrchr() is
used to strip possible path portion of the file name to mitigate
a possible attack. Unfortunately, strrchr() expects a buffer
that is NUL-terminated, and since we are processing potentially
untrusted data, we can not assert that be always true.
Solve this by reading in one less byte (now PATH_MAX) and
explicitly terminate the buffer after the read size with NUL.
Reported by: Coverity
CID: 1264915
X-MFC-with: 281500
MFC after: 13 days
emaste [Tue, 14 Apr 2015 19:18:34 +0000 (19:18 +0000)]
Increase vt font limits to allow use of GNU Unifont
PR: 199438
Submitted by: Ting-Wei Lan <lantw44@gmail.com>
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
kp [Tue, 14 Apr 2015 19:07:37 +0000 (19:07 +0000)]
pf: Fix forwarding detection
If the direction is not PF_OUT we can never be forwarding. Some input packets
have rcvif != ifp (looped back packets), which lead us to ip6_forward() inbound
packets, causing panics.
Equally, we need to ensure that packets were really received and not locally
generated before trying to ip6_forward() them.
Differential Revision: https://reviews.freebsd.org/D2286
Approved by: gnn(mentor)
delphij [Tue, 14 Apr 2015 18:13:55 +0000 (18:13 +0000)]
Eliminate unused headers.
asomers [Tue, 14 Apr 2015 16:33:33 +0000 (16:33 +0000)]
Initialize async_arg_ptr in xpt_async when called with async_code
AC_ADVINFO_CHANGED.
Without this change, newly inserted hard disks won't always have their
physical path device nodes created. The problem reproduces most readily
when attaching a large number of disks at once.
Differential Revision: https://reviews.freebsd.org/D2290
Reviewed by: mav, imp
MFC after: 2 weeks
Sponsored by: Spectra Logic
gnn [Tue, 14 Apr 2015 15:21:20 +0000 (15:21 +0000)]
Document internal interface types which are specific to FreeBSD.
gnn [Tue, 14 Apr 2015 14:43:42 +0000 (14:43 +0000)]
I can find no reason to allow packets with both SYN and FIN bits
set past this point in the code. The packet should be dropped and
not massaged as it is here.
Differential Revision: https://reviews.freebsd.org/D2266
Submitted by: eri
Sponsored by: Rubicon Communications (Netgate)
gnn [Tue, 14 Apr 2015 14:22:34 +0000 (14:22 +0000)]
When a kernel has DEVICE_POLLING turned on but no drivers have
the capability do not try to take the mutex at all.
Replaces misbegotten attempt from reverted commit 281276
Pointed out by: glebius
Sponsored by: Rubicon Communications (Netgate)
Differential Revision: https://reviews.freebsd.org/D2262
andrew [Tue, 14 Apr 2015 14:15:14 +0000 (14:15 +0000)]
* Remove the wfi when the efi loader returns, it's unneeded and is not
available on older designs.
* Enable the efi loader on arm
andrew [Tue, 14 Apr 2015 13:55:01 +0000 (13:55 +0000)]
Add support for arm64 to loader.efi and boot1.efi
Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
andrew [Tue, 14 Apr 2015 10:41:57 +0000 (10:41 +0000)]
Fix the arm64 MACHINE_CPUARCH value in the efi fdt glue code.
Sponsored by: The FreeBSD Foundation
andrew [Tue, 14 Apr 2015 10:40:37 +0000 (10:40 +0000)]
Use MACHINE in the efi loader when it is what we mean, it may not be the
same as MACHINE_CPUARCH, it just happened to be the case the architectures
this code currently supports.
Sponsored by: The FreeBSD Foundation
andrew [Tue, 14 Apr 2015 10:15:58 +0000 (10:15 +0000)]
Disable truss, gprof, and lint on arm64, they don't build.
Sponsored by: The FreeBSD Foundation
eadler [Tue, 14 Apr 2015 04:52:52 +0000 (04:52 +0000)]
ipcs: fix builds that use gcc
gcc gets annoyed by duplicate declarations
Reported by: sbruno
Reviewed by: sbruno
rrs [Tue, 14 Apr 2015 00:02:39 +0000 (00:02 +0000)]
Fix my stupid restoral of old code.. must be c_iflags now.
Thanks jhb for catching my stupidity...
MFC after: 3 days
rrs [Mon, 13 Apr 2015 23:06:13 +0000 (23:06 +0000)]
Restore the two lines accidentally deleted that allow CALLOUT_DIRECT to be
specifed in the flags.
Thanks Mark Johnston for noticing this ;-o
MFC after: 3 days
ngie [Mon, 13 Apr 2015 21:29:40 +0000 (21:29 +0000)]
Revert r281055 as it breaks installing test scripts in the mixed PROGS/SCRIPT
case
Repro is as follows:
% sudo pkg install -y kyua
% sudo rm -Rf /usr/tests
% sudo make hier
% (cd lib/libthr/tests/; make obj; make depend; make all; sudo make install)
% (cd /usr/tests/lib/libthr; kyua list)
Failure seen in Jenkins build starting here:
https://jenkins.freebsd.org/job/FreeBSD_HEAD-tests2/927/
Pointyhat to: bapt
delphij [Mon, 13 Apr 2015 20:23:46 +0000 (20:23 +0000)]
Sync with OpenBSD: Use volatile instead of __volatile__.
MFC after: 2 weeks
eadler [Mon, 13 Apr 2015 19:58:11 +0000 (19:58 +0000)]
ipcs: fix warnings (WARNS=1 -> WARNS=6)
- fix shadow warnings
- change type from off_t to size_t which is more correct and avoids
signed/unsigned compare
- use new initializer format to avoid "missing values" warning
Reviewed by: jhb
delphij [Mon, 13 Apr 2015 19:46:30 +0000 (19:46 +0000)]
Sync with NetBSD:
- Mention xz(1) in gzip(1).
- Strip away path from header name when decompressing.
MFC after: 2 weeks
neel [Mon, 13 Apr 2015 19:13:51 +0000 (19:13 +0000)]
Modify the return value of the uhci/ehci/xhci PCI probe routines to
'BUS_PROBE_DEFAULT'. This allows bhyve's 'ppt' driver to claim ownership
of the device and pass it through to the guest.
In the common case where there are no competing drivers for USB controllers
this change is a no-op.
Reviewed by: hselasky
MFC after: 2 weeks
andrew [Mon, 13 Apr 2015 16:41:33 +0000 (16:41 +0000)]
Add psci for arm64. This is currently used when rebooting and powering off
in qemu.
Sponsored by: The FreeBSD Foundation
andrew [Mon, 13 Apr 2015 16:00:09 +0000 (16:00 +0000)]
Create the correct symlinks for the machine directory, and only create the
x86 symlink on i386 and amd64. Before this incorrect symlinks were being
created on armi and i386.
Differential Revision: https://reviews.freebsd.org/D2283
Reviewed by: emaste, imp
Sponsored by: The FreeBSD Foundation
kib [Mon, 13 Apr 2015 15:22:45 +0000 (15:22 +0000)]
Add config option PAE_TABLES for the i386 kernel. It switches pmap to
use PAE format for the page tables, but does not incur other
consequences of the full PAE config. In particular, vm_paddr_t and
bus_addr_t are left 32bit, and max supported memory is still limited
by 4GB.
The option allows to have nx permissions for memory mappings on i386
kernel, while keeping the usual i386 KBI and avoiding the kernel data
sizing problems typical for the PAE config.
Intel documented that the PAE format for page tables is available
starting with the Pentium Pro, but it is possible that the plain
Pentium CPUs have the required support (Appendix H). The goal is to
enable the option and non-exec mappings on i386 for the GENERIC
kernel. Anybody wanting a useful system on 486, have to reconfigure
the modern i386 kernel anyway.
Discussed with: alc, jhb
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
andrew [Mon, 13 Apr 2015 14:43:10 +0000 (14:43 +0000)]
Bring in the start of the arm64 kernel.
This is only the minimum set of files needed to boot in qemu. As such it is
missing a few things.
The bus_dma code is currently only stub functions with a full implementation
from the development tree to follow.
The gic driver has been copied as the interrupt framework is different. It
is expected the two drivers will be merged by the arm intrng project,
however this will need to be imported into the tree and support for arm64
would need to be added.
This includes code developed by myself, SemiHalf, Ed Maste, and Robin
Randhawa from ARM. This has been funded by the FreeBSD Foundation, with
early development by myself in my spare time with assistance from Robin.
Differential Revision: https://reviews.freebsd.org/D2199
Reviewed by: emaste, imp
Relnotes: yes
Sponsored by: The FreeBSD Foundation
andrew [Mon, 13 Apr 2015 13:21:27 +0000 (13:21 +0000)]
Update the arm devmap code to also work with arm64.
There are a few differences between the two. On arm we need to provide a
list of addresses we may be mapping before we have initialised the virtual
memory subsystem, however on arm64 we allocate a small (2MiB for a 4k
granule) range to be used for such purposes.
Differential Revision: https://reviews.freebsd.org/D2249
Sponsored by: The FreeBSD Foundation
markj [Mon, 13 Apr 2015 01:55:42 +0000 (01:55 +0000)]
Fix a possible refcount leak in regen_tmpaddr().
public_ifa6 may be set to NULL after taking a reference to a previous
address list element. Instead, only take the reference after leaving the
loop but before releasing the address list lock.
Differential Revision: https://reviews.freebsd.org/D2253
Reviewed by: ae
MFC after: 2 weeks
eadler [Sun, 12 Apr 2015 23:43:41 +0000 (23:43 +0000)]
README:
- the reference to 'ancient' LINT file was added in 2000 [r64047 | alex
| 2000-07-31]. Remove the reference entirely now.
- add the tests directory
jkim [Sun, 12 Apr 2015 22:40:27 +0000 (22:40 +0000)]
Fix build on i386.
Reported by: bz
pluknet [Sun, 12 Apr 2015 21:14:58 +0000 (21:14 +0000)]
Remove obsolete bits about maximum number of file systems.
NMOUNT has gone together with static mount table in 4.3BSD-Reno.
MFC after: 1 week
pfg [Sun, 12 Apr 2015 16:43:55 +0000 (16:43 +0000)]
Add definition for the gcc gnu_inline attribute.
This uses a non-standard (who would guess that) inlining method
that is useful for legacy GNU software. This attribute was added
in GCC 4.1.3. Older versions of clang would just ignore the
attribute but as lately it is supported also there.
This is currently unused but it is required for the
FORTIFY_SOURCE extension.
takawata [Sun, 12 Apr 2015 15:08:41 +0000 (15:08 +0000)]
Accept LE event on hccontrol socket.
takawata [Sun, 12 Apr 2015 14:38:18 +0000 (14:38 +0000)]
Add HCI/LMP revision information.
andrew [Sun, 12 Apr 2015 13:00:58 +0000 (13:00 +0000)]
Add a driver for the ARM Power State Coordination Interface (PSCI). This
handles versions 0.1 and 0.2 of the standard on 32-bit ARM.
With this driver we can shutdown in QEMU. Further work is needed to
turn secondary cores on on boot and to support later revisions of the
specification.
Submitted by: Robin Randhawa <Robin.Randhawa at ARM.com>
Sponsored by: The FreeBSD Foundation
markm [Sun, 12 Apr 2015 11:23:59 +0000 (11:23 +0000)]
Fix a very minor typo.
kib [Sun, 12 Apr 2015 10:28:15 +0000 (10:28 +0000)]
Define capabilities bits from the revision 007 of the document 302223
"Intelб╝ Processor Vendor-Specific ACPI Interface Specification",
issied Dec 2014. Previous revision 005 was from Sep 2006.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
trasz [Sun, 12 Apr 2015 09:36:50 +0000 (09:36 +0000)]
Add libxo(3) support to iscsictl(8).
PR: 198396
Submitted by: Marie Helene Kvello-Aune <marieheleneka at gmail.com>
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
andrew [Sun, 12 Apr 2015 08:10:18 +0000 (08:10 +0000)]
Switch to the new v6 pmap code to increase its testing. It will now be
built as part of universe.
dchagin [Sun, 12 Apr 2015 06:21:58 +0000 (06:21 +0000)]
Rework r281162. Indeed, the flexible array member is preferable here.
Suggested by: Justin T. Gibbs
MFC after: 3 days
adrian [Sun, 12 Apr 2015 00:02:32 +0000 (00:02 +0000)]
Start enabling the available GPIO pins on the Carambola 2.
The carambola2 exposes all the gpio pins, but some are reserved for
core functions (eg usb, ethernet, etc.) Others are configured by default
to be available as normal GPIO pins to do interesting things with.
GPIO 18->23 is the I2S, SLIC and SPDIF device pins, but none of those
are currently used. So, just allow those to show up.
Tested:
* AR9344, Carambola 2
* (.. bitbang SPI to an Adafruit LCD via libgpio, because FreeBSD could
do with more shiny output devices that aren't network interfaces.)
TODO:
There are some other pins aren't currently included here, but should be.
The LED pins are for the internal switch inside the AR9344.
* GPIO 0+1 are "LED0 + LED1", but they're tied to high for bootstrapping.
* GPIO 13-17 are "LED2..7", but they're tied (H, L, L, L, H) for bootstrapping.
* GPIO 11 and 12 are UART RTS/CTS or I2S; but GPIO 12 is tied L for bootstrap.
alc [Sat, 11 Apr 2015 22:57:13 +0000 (22:57 +0000)]
Correct an off-by-one error in vm_reserv_reclaim_contig() that results in
an infinite loop.
Submitted by: Svatopluk Kraus
MFC after: 1 week
andrew [Sat, 11 Apr 2015 20:44:21 +0000 (20:44 +0000)]
Change the virtual address used to not be 0xc0000000, the arm loader
doesn't handle this address.
will [Sat, 11 Apr 2015 18:51:41 +0000 (18:51 +0000)]
uiomove_object_page(): Avoid instantiating pages in sparse regions on reads.
Check whether the page being requested is either resident or on swap. If
not, read from the zero_region instead of instantiating an unnecessary page.
This avoids consuming memory for sparse files on tmpfs, when they are read
by applications that do not use SEEK_HOLE/SEEK_DATA (which is most of them).
Reviewed by: kib
MFC after: 1 week
Sponsored by: Spectra Logic
rpaulo [Sat, 11 Apr 2015 18:45:22 +0000 (18:45 +0000)]
Add support for controlling the trackpoint when Synaptics is enabled.
To accomplish this, we must put the Synaptics hardware in passthrough
mode when talking to the trackpoint.
I only performed minor style modifications.
Submitted by: Jan Kokemüller <jan.kokemueller at gmail.com>
MFC after: 1 week
rpaulo [Sat, 11 Apr 2015 18:44:07 +0000 (18:44 +0000)]
Improve Synaptics support for newer touchpads.
Enable two finger scrolling by default and disable the edge scrolling if
the touchpad has no physical zone for it. Disable directional scrolling
by default to avoid using extended buttons as scroll buttons.
Add support for ClickPad. On Lenovo laptops, this is the button
reported when one presses the touchpad.
While there, fix a problem where the extended buttons were not reporting
the button release event correctly: we need to save the state of the
buttons and report it to sysmouse until we receive a packet from the
touchpad indicating the button has been released. This makes it
possible to use an extended button to resize a window. On Lenovo
laptops, the major buttons are actually reported as extended buttons.
Tested by: many (current@)
MFC after: 1 week
andrew [Sat, 11 Apr 2015 17:52:47 +0000 (17:52 +0000)]
Add support for the QEMU virt SoC. This is a SoC built depending on the
command line arguments passed in. It will then generate a dtb on the fly,
as such no dts will be added as it may be incorrect.
Relnotes: yes
andrew [Sat, 11 Apr 2015 17:16:23 +0000 (17:16 +0000)]
Add support for the uart classes to set their default register shift value.
This is needed with the pl011 driver. Before this change it would default
to a shift of 0, however the hardware places the registers at 4-byte
addresses meaning the value should be 2.
This patch fixes this for the pl011 when configured using the fdt. The
other drivers have a default value of 0 to keep this a no-op.
MFC after: 1 week
mjg [Sat, 11 Apr 2015 16:00:33 +0000 (16:00 +0000)]
Replace struct filedesc argument in getsock_cap with struct thread
This is is a step towards removal of spurious arguments.