Commit Graph

196132 Commits

Author SHA1 Message Date
Christian Brueffer
74342541e2 Fix a few grammar issues. 2015-01-05 13:46:37 +00:00
Warner Losh
9aca3e0f2b Clang's 3.5 integrated assembler now handles these files correctly (it
has support for the .codeXX directives). However, it is desirable, for
a time, to allow kernels to be built with clang 3.4. Historically, it
has been advantageous to allow stable X-1 to build kernels the old
way (so long as the impact of doing so is small), and this restores
that ability.

Also, centralize the addition of ${ASM_CFLAGS.${.IMPSRC}}, place it in
kern.mk rather than kern.pre.mk so that all modules can benefit, and
give the same treatment to CFLAGS in kern.mk as well.
2015-01-05 12:28:22 +00:00
Christian Brueffer
fe94dc19e8 Add a very basic manpage for the Etherswitch framework.
MFC after:	1 week
2015-01-05 11:40:05 +00:00
Bjoern A. Zeeb
5334f8d74f With r276692 m_align() moved and became an inline function.
Remove the (now) redundant function declaration.
2015-01-05 11:22:58 +00:00
Kevin Lo
26d9e20f50 Mention axge(4). 2015-01-05 10:10:35 +00:00
Robert Watson
ed6a66ca6c To ease changes to underlying mbuf structure and the mbuf allocator, reduce
the knowledge of mbuf layout, and in particular constants such as M_EXT,
MLEN, MHLEN, and so on, in mbuf consumers by unifying various alignment
utility functions (M_ALIGN(), MH_ALIGN(), MEXT_ALIGN() in a single
M_ALIGN() macro, implemented by a now-inlined m_align() function:

- Move m_align() from uipc_mbuf.c to mbuf.h; mark as __inline.
- Reimplement M_ALIGN(), MH_ALIGN(), and MEXT_ALIGN() using m_align().
- Update consumers around the tree to simply use M_ALIGN().

This change eliminates a number of cases where mbuf consumers must be aware
of whether or not mbufs returned by the allocator use external storage, but
also assumptions about the size of the returned mbuf. This will make it
easier to introduce changes in how we use external storage, as well as
features such as variable-size mbufs.

Differential Revision:	https://reviews.freebsd.org/D1436
Reviewed by:	glebius, trasz, gnn, bz
Sponsored by:	EMC / Isilon Storage Division
2015-01-05 09:58:32 +00:00
Adrian Chadd
cd470fead8 Remove the remnants of the OpenWRT/Linux bits that this was based off
of.

Obtained from:	Linux/OpenWRT
2015-01-05 05:30:07 +00:00
Adrian Chadd
3eda0cb18c Oops - missed refclk.
Tested:

* AP135, QCA955x SoC
2015-01-05 05:26:57 +00:00
Ed Maste
a726543364 addr2line: fflush output after each address lookup
Certain tools spawn addr2line and pass addresses one at a time for
resolution.

PR:		195561
Reported by:	antoine
Sponsored by:	The FreeBSD Foundation
2015-01-05 04:56:38 +00:00
Nathan Whitehorn
a4f7863238 Add kexec-based Linux shim loader for use with the firmware petitboot
loader on PS3 and POWER8 systems. This is reasonably portable to other
architectures, especially FDT-based ones, if similar features are useful
elsewhere.

Netboot support is missing for now and will be added in a future commit,
at which time loader.ps3 will be garbage collected.

Done at:	Hackathon
2015-01-05 04:33:39 +00:00
Adrian Chadd
855c46100d Add initial Qualcomm Atheros QCA955x SoC support.
This adds the initial frequency poking and configures up enough
for it to boot and spit out data over the console.

There's still a whole bunch of work to do in the reset path
and devices to support this thing, but hey, it's alive!

ath> go 0x80050100
## Starting application at 0x80050100 ...
CPU platform: Atheros AR9558 rev 0
CPU Frequency=720 MHz
CPU DDR Frequency=600 MHz
CPU AHB Frequency=200 MHz
platform frequency: 720 MHz
CPU reference clock: 0 MHz
CPU MDIO clock: 40 MHz

Done at:	hackathon
Obtained from:	Linux OpenWRT, Qualcomm Atheros
2015-01-05 02:06:26 +00:00
Adrian Chadd
917d2c3c3b ACK interrupts on the new SoCs. 2015-01-05 02:00:41 +00:00
Adrian Chadd
dc6fff9835 add QCA955x SoC types. 2015-01-05 01:59:44 +00:00
Adrian Chadd
55b32e75df Add QCA955x series register definitions.
There's likely a bunch of register offsets that I have to add the
register window base to before I use them.

Done at:	Hackathon
Obtained from:	Linux OpenWRT
2015-01-05 01:44:23 +00:00
Konstantin Belousov
1a744fefc2 Avoid calling internal libc function through PLT or accessing data
though GOT, by staticizing and hiding.  Add setter for
__error_selector to hide it as well.

Suggested and reviewed by:	jilles
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2015-01-05 01:06:54 +00:00
Nathan Whitehorn
fd520b6e21 Use FDT properties to identify a PS3 if present. 2015-01-05 01:05:35 +00:00
Nathan Whitehorn
f1d2752f31 Make PS3 work with the userspace kboot loader. loader.ps3 will disappear
from the tree in the near future.

Done at:	Hackathon
2015-01-05 00:50:16 +00:00
Enji Cooper
e97b30d879 Bump .Dd again for the change done in r276483
Pointyhat to: me
2015-01-05 00:03:42 +00:00
Enji Cooper
a812392203 Expect :arithmetic_ops_body to fail with syntax errors on FreeBSD
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2015-01-04 23:41:17 +00:00
Ruslan Bukin
2499610b9a Do not configure Altera PIO device on ARM startup.
PIO is a device implemented in soft-core and becomes
available after flashing FPGA only.
2015-01-04 23:14:04 +00:00
Enji Cooper
dd2b763aa5 Integrate bin/cat/tests from NetBSD into atf/kyua
Sponsored by: EMC / Isilon Storage Division
2015-01-04 22:37:44 +00:00
Enji Cooper
b219c275cc Integrate sbin/ifconfig/tests from NetBSD into atf/kyua
Sponsored by: EMC / Isilon Storage Division
2015-01-04 22:25:16 +00:00
Ian Lepore
bbae23a725 Eliminate uninitialized variable warnings in kernel and module builds when
building with gcc 4.2

This has been requested several times over the past few months by several
people (including me), because gcc 4.2 just gets it wrong too often.  It's
causing us to litter the code with lots of bogus initializers just to
squelch the warnings.  We still have clang and coverity telling us about
uninitialized variables, and they do so more accurately.
2015-01-04 20:08:24 +00:00
Justin T. Gibbs
5b326a32ce Prevent live-lock and access of destroyed data in taskqueue_drain_all().
Phabric:	https://reviews.freebsd.org/D1247
Reviewed by:	jhb, avg
Sponsored by:	Spectra Logic Corporation

sys/kern_subr_taskqueue.c:
	Modify taskqueue_drain_all() processing to use a temporary
	"barrier task", rather than rely on a user task that may
	be destroyed during taskqueue_drain_all()'s execution.  The
	barrier task is queued behind all previously queued tasks
	and then has its priority elevated so that future tasks
	cannot pass it in the queue.

	Use a similar barrier scheme to drain threads processing
	current tasks.  This requires taskqueue_run_locked() to
	insert and remove the taskqueue_busy object for the running
	thread for every task processed.

share/man/man9/taskqueue.9:
	Remove warning about live-lock issues with taskqueue_drain_all()
	and indicate that it does not wait for tasks queued after
	it begins processing.
2015-01-04 19:55:44 +00:00
Kevin Lo
aad37c8145 Change the type of blksize_t from uint32_t to a POSIX compliant int32_t
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_types.h.html
2015-01-04 15:26:02 +00:00
Joel Dahl
f636caf195 mdoc: paragraph improvements. 2015-01-04 12:49:24 +00:00
Joel Dahl
385385fb1c mdoc: use An macro. 2015-01-04 12:42:08 +00:00
Joel Dahl
73461c24c4 mdoc: sort SEE ALSO. 2015-01-04 12:38:00 +00:00
Dmitry Chagin
1beb1a8e13 Regen for r276654 (__getcwd()). 2015-01-04 10:40:23 +00:00
Dmitry Chagin
9f7a06f27e Indeed, instead of hiding the kern___getcwd() bug by bogus cast
in r276564, change path type to char * (pathnames are always char *).
And remove bogus casts of malloc().
kern___getcwd() internally doesn't actually use or support u_char *
paths, except to copy them to a normal char * path.

These changes are not visible to libc as libc/gen/getcwd.c misdeclares
__getcwd() as taking a plain char * path.

While here remove _SYS_SYSPROTO_H_ for __getcwd() syscall as
we always have sysproto.h.

Pointed out by:	bde

MFC after:	1 week
2015-01-04 10:34:02 +00:00
Justin Hibbits
41ddc6ea3d Truncate DB_SMALL_VALUE_MAX to a much lower value.
Unlike the other architectures, the PowerPC kernel is loaded under the 2GB
boundary.

MFC after:	2 weeks
2015-01-04 01:45:26 +00:00
Baptiste Daroussin
bbb0fbde9a Add pregenerated documentation for as(1) and ld(1) 2015-01-04 00:58:30 +00:00
Baptiste Daroussin
4a3e081c7b Fix generating documentation with modern texinfo 2015-01-04 00:54:29 +00:00
Baptiste Daroussin
321f9e5ad9 Fix generating documents with modern texinfo 2015-01-04 00:44:24 +00:00
Konstantin Belousov
0c5cba543b Do not erronously export 'openat' symbol from rtld.
The symbol leaked after r276630 since lib/libc/sys/openat.c defines
versions for openat using .symver (version script cannot assign two
versions to one symbol), and rtld uses openat.  Instead, directly use
__sys_openat().

Reported and tested by:	antoine
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2015-01-04 00:33:41 +00:00
Ian Lepore
c6f7b90092 Don't allow clang to use fpu instructions or registers in kernel modules.
Submitted by:	Keith White <kwhite@site.uottawa.ca>
2015-01-04 00:12:30 +00:00
Ian Lepore
fbf1ef4849 Switch all arm kernels with option SMP to use SCHED_ULE instead of 4BSD. 2015-01-03 23:57:03 +00:00
Baptiste Daroussin
0489fbcd33 Only manpages with fatal errors should be rendered by groff(1) 2015-01-03 23:39:44 +00:00
Ian Lepore
dad0c32719 Remove commented-out options SMP and APIC_IO from old arm boards that will
never be able to support smp.
2015-01-03 23:30:29 +00:00
Baptiste Daroussin
04803ab217 Import NetBSD vis(1) mandoc fixes 2015-01-03 23:16:13 +00:00
Baptiste Daroussin
584d8a41f5 Import vis(1) manpage fixes from NetBSD 2015-01-03 23:15:01 +00:00
Justin Hibbits
031a27e354 The radeon DRI module doesn't really work correctly on powerpc, so don't build
it.  Hopefully we'll get radeonkms eventually.

Discussed with:	nwhitehorn
MFC after:	2 weeks
2015-01-03 22:36:18 +00:00
Ian Lepore
7e55f8c198 Add a new trap-v6.c which has support for all armv7 exceptions. This
mostly paves the way for the new pmap code, and shouldn't result in any
noticible behavior differences.

Submitted by: Svatopluk Kraus <onwahe@gmail.com>,
              Michal Meloun <meloun@miracle.cz
2015-01-03 22:33:18 +00:00
Justin Hibbits
c726c65e6b PowerPC also needs ofw_bus_if.h when using FDT. 2015-01-03 21:47:32 +00:00
Justin Hibbits
b59e55a927 Missed the header for the note definition.
X-MFC-with:	r276634
MFC after:	2 weeks
2015-01-03 21:44:47 +00:00
Justin Hibbits
971e8cb1c0 Resort and resize the altivec registers in the pcb. vrsave and vscr are both
32-bit registers via the PowerPC spec.

X-MFC-with:	r276634
MFC after:	2 weeks
2015-01-03 21:08:27 +00:00
Justin Hibbits
7bde2664d6 Dump VMX registers into the userland coredump.
Reviewed by:	nwhitehorn
MFC after:	2 weeks
2015-01-03 21:06:06 +00:00
Ian Lepore
0d203a6065 Create a custom /boot/defaults/loader.conf for ARM. This differs from the
standard file in the following ways:

 - modules_path includes /boot/dtb
 - It doesn't contain 533 lines, of which 500 are either commented out,
   empty, or something_which_doesnt_work_on_arm_anyway=NO

The standard defaults file takes 40+ seconds to process on an arm beaglebone
board.  This one takes just a couple seconds.

This gets installed instead of the original because of the .PATH magic in
the makefile.
2015-01-03 19:38:37 +00:00
Konstantin Belousov
8495e8b1e9 Fix known issues which blow up the process after dlopen("libthr.so")
(or loading a dso linked to libthr.so into process which was not
linked against threading library).

- Remove libthr interposers of the libc functions, including
  __error(). Instead, functions calls are indirected through the
  interposing table, similar to how pthread stubs in libc are already
  done.  Libc by default points either to syscall trampolines or to
  existing libc implementations.  On libthr load, libthr rewrites the
  pointers to the cancellable implementations already in libthr.  The
  interposition table is separate from pthreads stubs indirection
  table to not pull pthreads stubs into static binaries.

- Postpone the malloc(3) internal mutexes initialization until libthr
  is loaded.  This avoids recursion between calloc(3) and static
  pthread_mutex_t initialization.

- Reinstall signal handlers with wrapper on libthr load.  The
  _rtld_is_dlopened(3) is used to avoid useless calls to sigaction(2)
  when libthr is statically referenced from the main binary.

In the process, fix openat(2), swapcontext(2) and setcontext(2)
interposing.  The libc symbols were exported at different versions
than libthr interposers.  Export both libc and libthr versions from
libc now, with default set to the higher version from libthr.

Remove unused and disconnected swapcontext(3) userspace implementation
from libc/gen.

No objections from:	deischen
Tested by:	pho, antoine (exp-run) (previous versions)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2015-01-03 18:38:46 +00:00
Konstantin Belousov
0e521992a4 Add rtld private interface for dso to detect dynamic loading
vs. static linking.

Tested by:	pho, antoine (exp-run)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2015-01-03 18:09:53 +00:00