Commit Graph

6788 Commits

Author SHA1 Message Date
Dimitry Andric
6404f697a0 Merging ^/head r279596 through r279758. 2015-03-07 23:01:27 +00:00
Nathan Whitehorn
5c845fde2e Make 32-bit PowerPC kernels, like 64-bit PowerPC kernels, position-independent
executables. The goal here, not yet accomplished, is to let the e500 kernel
run under QEMU by setting KERNBASE to something that fits in low memory and
then having the kernel relocate itself at runtime.
2015-03-07 20:14:46 +00:00
Dimitry Andric
ca65be80fd Merge ^/head r279313 through r279595. 2015-03-04 19:47:33 +00:00
Jean-Sébastien Pédron
3d7f3c9d52 Record the dependency to x86bios in vga_pci
This fixes the build of XEN and XBOX kernels on i386, which was broken
in r279487.

While here, do not build vga_pci_repost() on PC98.

Reported by:	bz@
2015-03-01 20:54:29 +00:00
Ryan Stone
1191f7156f Add infrastructure for exporting config schema from PF drivers
Differential Revision:	https://reviews.freebsd.org/D80
MFC after: 		1 month
Sponsored by:		Sandvine Inc.
2015-03-01 00:40:42 +00:00
Ryan Stone
9bfb1e36d9 Implement interface to create SR-IOV Virtual Functions
Implement the interace to create SR-IOV Virtual Functions (VFs).
When a driver registers that they support SR-IOV by calling
pci_setup_iov(), the SR-IOV code creates a new node in /dev/iov
for that device.  An ioctl can be invoked on that device to
create VFs and have the driver initialize them.

At this point, allocating memory I/O windows (BARs) is not
supported.

Differential Revision:	https://reviews.freebsd.org/D76
Reviewed by:		jhb
MFC after: 		1 month
Sponsored by:		Sandvine Inc.
2015-03-01 00:40:09 +00:00
Ryan Stone
4d6a976e37 Move libnv into the kernel and hook it into the kernel build
Differential Revision:		https://reviews.freebsd.org/D1883
Reviewed by:			jfv
MFC after:			1 month
Sponsored by:			Sandvine Inc.
2015-03-01 00:34:27 +00:00
Ryan Stone
3cd4533107 Implement asprintf in libkern
Differential Revision:		https://reviews.freebsd.org/D1877
Reviewed by:			pjd, jfv
MFC After:			1 month
Sponsored by:			Sandvine Inc.
2015-03-01 00:22:16 +00:00
Luiz Otavio O Souza
befcc3e26b Add a driver for the Maxim DS3231 a low-cost, extremely accurate (+-2PPM)
I2C real-time clock (RTC).

The DS3231 has an integrated temperature-compensated crystal oscillator
(TXCO) and crystal.

DS3231 has a temperature sensor, an independent 32kHz output (which can be
turned on and off by the driver) and another output that can be used as
interrupt for alarms or as a second square-wave output, which frequency and
operation mode can be set by driver sysctl(8) knobs.

Differential Revision:	https://reviews.freebsd.org/D1016
Reviewed by:	ian, rpaulo
Tested on:	Raspberry pi model B
2015-02-28 19:02:44 +00:00
Nathan Whitehorn
e52a2dc83c Use appropriate alternative to -msoft-float for clang-built PowerPC kernels. 2015-02-27 20:32:50 +00:00
Dimitry Andric
0d56a8cba1 Merge ^/head r279163 through r279308. 2015-02-26 07:26:56 +00:00
Andrew Rybchenko
e02196c57f sfxge: add to config files
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)
2015-02-25 06:20:42 +00:00
Dimitry Andric
0d36d957d3 Merging ^/head r278916 through r279022. 2015-02-19 21:10:01 +00:00
Gleb Smirnoff
6740ed378b Use KTR_COMPILE=(KTR_ALL) for LINTs, to get more code coverage. 2015-02-19 17:03:13 +00:00
Andrew Turner
aeca5b8bc9 Use the ARM unwinder with dtrace to extract the stack when asked. With this
dtrace is able to display a stack trace similar to the one below.

# dtrace -p 603 -n 'tcp:kernel::receive { stack(); }'
  0     70                         :receive
              kernel`ip_input+0x140
              kernel`netisr_dispatch_src+0xb8
              kernel`ether_demux+0x1c4
              kernel`ether_nh_input+0x3a8
              kernel`netisr_dispatch_src+0xb8
              kernel`ether_input+0x60
              kernel`cpsw_intr_rx+0xac
              kernel`intr_event_execute_handlers+0x128
              kernel`ithread_loop+0xb4
              kernel`fork_exit+0x84
              kernel`swi_exit
              kernel`swi_exit

Tested by:	gnn
Sponsored by:	ABT Systems Ltd
2015-02-19 12:20:21 +00:00
Andrew Turner
1b23f9b9c3 Allow the ARM unwinder to work through modules. This will be used to add
support for unwinding from dtrace.

Tested by:	gnn (with dtrace)
Sponsored by:	ABT Systems Ltd
2015-02-19 12:06:57 +00:00
Jung-uk Kim
1c0e1b6da9 Merge ACPICA 20141107 and 20150204. 2015-02-18 20:33:00 +00:00
Warner Losh
35c4406d4c Populate new KERN_OPTS from all the opt_*.h files in
KERNBUILDDIR. Come up with some sensible defaults (though listing them
in kmod.mk may be unwise -- we have no easy way to know what are the
best sensible defaults for everything so we just catch the big stuff).
Append SRCS.${opt} for each option in KERN_OPTS to SRCS to allow easy
conditional compilation. Append any notion of KERN_OPTS_EXTRA to the
list of kernel opts.

Differential Revision:    https://reviews.freebsd.org/D1530
2015-02-18 15:25:19 +00:00
Dimitry Andric
714e3c812d Merge ^/head r278756 through r278915. 2015-02-17 19:53:41 +00:00
Gleb Smirnoff
cc4a90c445 Globally enable -fms-extensions when building kernel with gcc, and remove
this option from all modules that enable it theirselves.
  In C mode -fms-extensions option enables anonymous structs and unions,
allowing us to use this C11 feature in kernel. Of course, clang supports
it without any extra options.

Reviewed by:	dim
2015-02-17 19:27:14 +00:00
Andrew Turner
6da235a325 Pull the ARM ddb unwind code out to a new file. This will allow it to be
used by other places that expect to unwind the stack, e.g. dtrace and
stack(9).

As I have written most of this code I'm changing the license to the
standard FreeBSD license. I have received approval from the other
developers who have changed any of the affected code.

Approved by:	ian, imp, rpaulo, eadler (all license change)
2015-02-17 13:09:20 +00:00
Hans Petter Selasky
8a8f7d5bad Fix compilation of the SDP driver and a compile warning after r278886.
Also fix the kernel build rule for mlx4_exp.c.
This fixes the LINT kernel target for amd64.

Sponsored by:	Mellanox Technologies
MFC after:	1 month
2015-02-17 10:00:15 +00:00
Hans Petter Selasky
b5c1e0cb8d Update the infiniband stack to Mellanox's OFED version 2.1.
Highlights:
 - Multiple verbs API updates
 - Support for RoCE, RDMA over ethernet

All hardware drivers depending on the common infiniband stack has been
updated aswell.

Discussed with:	np @
Sponsored by:	Mellanox Technologies
MFC after:	1 month
2015-02-17 08:40:27 +00:00
Hans Petter Selasky
0867995ca0 Import USB display link driver from OpenBSD. Support for compression
has been removed and the driver has been greatly simplified and
optimised for FreeBSD. The driver is currently not built by default.

Requested by:	Bruce Simpson <bms@fastmail.net>
2015-02-15 12:02:17 +00:00
Hans Petter Selasky
0761549550 Import videomode code from NetBSD which is needed by USB display link drivers. 2015-02-15 11:37:40 +00:00
Dimitry Andric
569e61a4fc Merge ^/head r278499 through r278755. 2015-02-14 13:12:03 +00:00
Warner Losh
128f80a617 Properly quote EXTRA_MODULES and WITHOUT_MODULES to ensure that they
are passed down properly when there's more than one.
2015-02-10 15:15:08 +00:00
Dimitry Andric
93466fc60f Merge ^/head r278351 through r278498. 2015-02-10 07:56:14 +00:00
Rui Paulo
29d0137a8d Remove FreeBSD/wii.
This port failed to gain traction and probably only a couple Wii consoles
ran FreeBSD all the way to single user mode with an md(4). IPC
support was never implemented, so it was impossible to use any peripheral

Any further development, if any, will happen at https://github.com/rpaulo/wii.

Discussed with:	nathanw (a long time ago), jhibbits
2015-02-10 06:35:16 +00:00
Warner Losh
cbe6c25d2e Prefer install over mkdir to create the directory. Add test to ensure
the directory doesn't exist before creating it. This makes the NO_ROOT
case actually work.

Suggested by: brooks@
2015-02-09 16:29:44 +00:00
Warner Losh
9f78f7b262 Move these definitions to bsd.own.mk along side the kernel directory /
user defines. Make this work with WITH_INSTALL_AS_USER as well.

Noticed by: ian@
2015-02-09 16:21:49 +00:00
Warner Losh
2cfaebb681 Fix typo.
Submitted by: jhb@
2015-02-09 16:10:30 +00:00
Warner Losh
2d29166779 We need to create /boot/dtb since some use cases don't create a full
root with BSD.root.mtree, so it often times will not exist. Rather
than force the latter for an installkernel, just create the directory
with a comment about why.

Submitted by: Guy Yur
2015-02-09 16:04:08 +00:00
Warner Losh
ef6fcdc651 Make sure that we define DTB{OWN,GRP,MODE} so install works.
Submitted by: Guy Yur
2015-02-09 16:04:01 +00:00
Warner Losh
3e7ec4b67d Pass MODULES_EXTRA to the modules build. While I'm here, also always
pass WITHOUT_MODULES down. There's no need to make this conditional.

Submitted by: Guy Yur
2015-02-09 16:03:59 +00:00
Warner Losh
a469e551a4 Enforce that MK_foo options shall be either "yes" or "no" and nothing
else.
2015-02-09 16:03:55 +00:00
Adrian Chadd
84ac51d883 Add WPI_DEBUG option.
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-02-07 23:09:03 +00:00
Dimitry Andric
b40d827331 Merging ^/head r278298 through r278350. 2015-02-07 12:57:40 +00:00
Enji Cooper
f1c3d09a42 Unbreak the build (memchr is explicitly required by devctl(9) after r278320)
Submitted by: Michael Butler <imb@protected-networks.net>
Reported by: O. Hartmann <ohartman@zedat.fu-berlin.de>
2015-02-06 23:34:40 +00:00
Davide Italiano
85a61b4f11 Always prefer double dashes for GNU LD long options.
I discovered this while working on llvm/lld and realized export-dynamic
only supported --. Although upstream will eventually grow to support
both - and --, switch this in our build system, because GNU ld supports
both modes, and because there's some hope lld will become the default linker
for FreeBSD in the future.

Discussed with:		emaste, rdivacky
2015-02-06 03:49:31 +00:00
Dimitry Andric
bd9cc051b3 Merging ^/head r278224 through r278297. 2015-02-05 22:34:29 +00:00
Oleksandr Tymoshenko
262f27b29e Import VCHI driver for Broadcom's VideoCore IV GPU
Differential Revision:	D1753
2015-02-05 19:54:03 +00:00
John-Mark Gurney
9541307fb7 turn GEOM_UNCOMPRESS_DEBUG into a proper option so it can be specified
in kernel config files..

put VERBOSE_SYSINIT in it's own option header so the one file,
init_main.c, can use it instead of requiring an entire kernel recompile
to change one file..
2015-02-05 07:51:38 +00:00
Peter Wemm
5d6adf256f Add -fwrapv to CFLAGS for the kernel. This essentially un-reverts r259045.
The C standard undefines behavior when signed integers overflow. The
compiler toolchain has become more adept at detecting this and taking
advantage of faster undefined behavior.  At the current time this has the
unfortunate effect of the clock stopping after 24 days of uptime.

clang makes no distinction between -fwrapv and -fno-strict-overflow.  gcc
does treat them differently but -fwrapv is mature in gcc and is the
behavior are actually expecting.

Obtained from:	kib
2015-02-05 01:36:53 +00:00
Dimitry Andric
a403ab7f64 Merge ^/head r278110 through r278223. 2015-02-04 21:08:28 +00:00
Bryan Venteicher
d3ccddf3ce Generalized parts of the XEN timer code into a generic pvclock
KVM clock shares the same data structures between the guest and the host
as Xen so it makes sense to just have a single copy of this code.

Differential Revision: https://reviews.freebsd.org/D1429
Reviewed by:	royger (eariler version)
MFC after:	1 month
2015-02-04 08:26:43 +00:00
Dimitry Andric
73ee00cef5 Merge ^/head r278005 through r278109. 2015-02-02 20:18:47 +00:00
Hans Petter Selasky
8b1ce3297a Optimise allocation of USB DMA structures. By default don't double map
allocations if only one element should be allocated per page
cache. Make one allocation per element compile time configurable. Fix
a comment while at it.

Suggested by:	ian @
MFC after:	1 week
2015-02-02 11:32:15 +00:00
Dimitry Andric
acdf53f9a3 Merge ^/head r277975 through r277998. 2015-01-31 20:49:30 +00:00
Nathan Whitehorn
0fa2250548 Build the powerpc64 kernel as a position-independent executable. At startup,
it processes its own ELF relocations and can be loaded and run in place at
any physical/virtual address.

NB: This requires an updated loader to boot!

Relnotes:	yes
2015-01-31 19:16:51 +00:00