Warner Losh [Sun, 16 Mar 2014 15:22:52 +0000 (15:22 +0000)]
Align all comments in config files on same column. This consistency
helps when bits and pieces of GENERIC from i386 or amd64 are cut and
pasted into other architecture's config files (which in the case of
ARM had gotten rather akimbo).
Warner Losh [Sun, 16 Mar 2014 15:22:46 +0000 (15:22 +0000)]
Make all the comments '# ' and align to same column. This fixes the
rampently incosnsitent usage which made cut and paste from one file
to another look ugly.
Andrew Turner [Sun, 16 Mar 2014 13:16:30 +0000 (13:16 +0000)]
Add an optimised version of the float and double helper functions. These
are only used on armv6 when the vfp unit is detected. They will also be
available for the upcoming armv6hf platform, however while not used by
default there will need to be defined for any software that calls them
directly.
Though there currently isn't a way to insert new media into an ATAPI
drive, at least pretend to support Asynchronous Notification (AN) to
avoid a guest needlessly polling for it.
Michael Tuexen [Sun, 16 Mar 2014 12:32:16 +0000 (12:32 +0000)]
* Provide information in error causes in ASCII instead of
proprietary binary format.
* Add support for a diagnostic information error cause.
The code is sysctlable and the default is 0, which
means it is not sent.
Robert Watson [Sun, 16 Mar 2014 10:55:57 +0000 (10:55 +0000)]
Update kernel inclusions of capability.h to use capsicum.h instead; some
further refinement is required as some device drivers intended to be
portable over FreeBSD versions rely on __FreeBSD_version to decide whether
to include capability.h.
Robert Watson [Sun, 16 Mar 2014 10:49:16 +0000 (10:49 +0000)]
Rename capability.h to capsicum.h: the original name conflicts with the
draft POSIX.1e capability.h used on some systems (e.g., Linux). On
FreeBSD, leave a wrapper header so that current code continues to compile.
We will eventually want to deprecate the old header as the presence of a
capability.h may be confusing some configure scripts.
Suggested by: David Drysdale <drysdale at google.com>
Discussed on: cl-capsicum-discuss
MFC after: 3 weeks
Andrew Turner [Sun, 16 Mar 2014 09:40:05 +0000 (09:40 +0000)]
Only build the vfp/softfp switching code on armv6 as we don't support vfp
on anything earlier than this. This should fix the armeb and arm builds
when using gcc.
Adrian Chadd [Sun, 16 Mar 2014 08:38:31 +0000 (08:38 +0000)]
* Handle the three other timer interrupts for now, from the AR724x
later. If the interrupts are ACKed even if they're not masked, we get
the interrupts again later. Grr.
* The AR724x and later chips want the interrupt bits cleared by writing the
relevant bit to it, NOT by writing all but the current interrupt to it.
Tested:
* AR9344, DB120 reference board
TODO:
* Test ar724x and later chips to ensure no regressions have occured.
Julio Merino [Sun, 16 Mar 2014 08:04:06 +0000 (08:04 +0000)]
Migrate most of tools/regression/usr.bin/ to the new tests layout.
I'm starting with the easy cases. The leftovers need to be looked at a
bit more closely.
Note that this change _does_ modify the code of the old tests. This is
required in order to allow the code to locate the data files in the
source directory instead of the current directory, because Kyua
automatically changes the latter to a temporary directory.
Also note that at least one test is known to be broken here. Actually,
the test is not really broken: it's marked as a TODO but unfortunately
Kyua's TAP parser currently does not understand that. Will have to be
fixed separately.
Julio Merino [Sun, 16 Mar 2014 04:09:22 +0000 (04:09 +0000)]
Migrate tools/regression/{usr.bin/lastcomm,usr.sbin}/ to the new tests layout.
This change was originally going to only migrate the usr.sbin tests but, as
it turns out, the usr.sbin/sa/ tests require files from usr.bin/lastcomm/
so it's better to just also migrate the latter at the same time. The other
usr.bin tests will be moved separately.
To make these tests work within the test suite, some of them have required
changes to prevent modifying the source directory and instead just rely on
the current directory for file manipulation.
Adrian Chadd [Sun, 16 Mar 2014 02:41:47 +0000 (02:41 +0000)]
Handle the case where both arge0 and arge1 MAC addresses are available via
'eeprommac'.
The existing driver would just make arge units past 0 take the primary
MAC and increment it by the unit number, without correct address wrapping.
That has to be fixed at a later date.
John-Mark Gurney [Sun, 16 Mar 2014 01:43:23 +0000 (01:43 +0000)]
replace the kernel's version w/ cperciva's implementation... In all
my tests, it is faster ~20%, even on an old IXP425 533MHz it is ~45%
faster... This is partly due to loop unrolling, so the code size does
significantly increase... I do plan on committing a version that
rolls up the loops again for smaller code size for embedded systems
where size is more important than absolute performance (it'll save ~6k
code)...
The kernel implementation is now shared w/ userland's libcrypt and
libmd...
We drop support for sha256 from sha2.c, so now sha2.c only contains
sha384 and sha512...
John-Mark Gurney [Sun, 16 Mar 2014 00:53:40 +0000 (00:53 +0000)]
change td_retval into a union w/ off_t, with defines to mask the
change... This eliminates a cast, and also forces td_retval
(often 2 32-bit registers) to be aligned so that off_t's can be
stored there on arches with strict alignment requirements like
armeb (AVILA)... On i386, this doesn't change alignment, and on
amd64 it doesn't either, as register_t is already 64bits...
This will also prevent future breakage due to people adding additional
fields to the struct...
Fix a race wherein the source of an interrupt vector is wrongly
attributed if an ExtINT arrives during interrupt injection.
Also, fix a spurious interrupt if the PIC tries to raise an interrupt
before the outstanding one is accepted.
Finally, improve the PIC interrupt latency when another interrupt is
raised immediately after the outstanding one is accepted by creating a
vmexit rather than waiting for one to occur by happenstance.
Jilles Tjoelker [Sat, 15 Mar 2014 14:58:48 +0000 (14:58 +0000)]
sh: Allow kill %job on jobs started without job control.
When killing a %job started without job control, kill all processes in it.
As with process groups and zombies, if any process in the job can be killed
or has already terminated, the command is successful.
This also fixes occasional failures of the builtins/kill1.0 test.
Robert Watson [Sat, 15 Mar 2014 00:57:50 +0000 (00:57 +0000)]
Several years after initial development, merge prototype support for
linking NIC Receive Side Scaling (RSS) to the network stack's
connection-group implementation. This prototype (and derived patches)
are in use at Juniper and several other FreeBSD-using companies, so
despite some reservations about its maturity, merge the patch to the
base tree so that it can be iteratively refined in collaboration rather
than maintained as a set of gradually diverging patch sets.
(1) Merge a software implementation of the Toeplitz hash specified in
RSS implemented by David Malone. This is used to allow suitable
pcbgroup placement of connections before the first packet is
received from the NIC. Software hashing is generally avoided,
however, due to high cost of the hash on general-purpose CPUs.
(2) In in_rss.c, maintain authoritative versions of RSS state intended
to be pushed to each NIC, including keying material, hash
algorithm/ configuration, and buckets. Provide software-facing
interfaces to hash 2- and 4-tuples for IPv4 and IPv6 using both
the RSS standardised Toeplitz and a 'naive' variation with a hash
efficient in software but with poor distribution properties.
Implement rss_m2cpuid()to be used by netisr and other load
balancing code to look up the CPU on which an mbuf should be
processed.
(3) In the Ethernet link layer, allow netisr distribution using RSS as
a source of policy as an alternative to source ordering; continue
to default to direct dispatch (i.e., don't try and requeue packets
for processing on the 'right' CPU if they arrive in a directly
dispatchable context).
(4) Allow RSS to control tuning of connection groups in order to align
groups with RSS buckets. If a packet arrives on a protocol using
connection groups, and contains a suitable hardware-generated
hash, use that hash value to select the connection group for pcb
lookup for both IPv4 and IPv6. If no hardware-generated Toeplitz
hash is available, we fall back on regular PCB lookup risking
contention rather than pay the cost of Toeplitz in software --
this is a less scalable but, at my last measurement, faster
approach. As core counts go up, we may want to revise this
strategy despite CPU overhead.
Where device drivers suitably configure NICs, and connection groups /
RSS are enabled, this should avoid both lock and line contention during
connection lookup for TCP. This commit does not modify any device
drivers to tune device RSS configuration to the global RSS
configuration; patches are in circulation to do this for at least
Chelsio T3 and Intel 1G/10G drivers. Currently, the KPI for device
drivers is not particularly robust, nor aware of more advanced features
such as runtime reconfiguration/rebalancing. This will hopefully prove
a useful starting point for refinement.
No MFC is scheduled as we will first want to nail down a more mature
and maintainable KPI/KBI for device drivers.
Neel Natu [Fri, 14 Mar 2014 22:07:08 +0000 (22:07 +0000)]
Don't dump entries that were modified during the time the KTR buffer was being
copied to userspace. Failing to do this would result in entries at the bottom
of the ktrdump output to be more recent than entries at the top.
With this change the timestamps are monotonically decreasing going from the
top to the bottom of the ktrdump output.
Neel Natu [Fri, 14 Mar 2014 21:35:16 +0000 (21:35 +0000)]
Fix an issue with ktrdump(8) where it would not print all entries in the
KTR buffer.
This happens when 'i' tries to wrap around from 0 to 'entries - 1'. Since 'i'
is a signed integer the modulo operation actually returns a negative number.
Fix this by computing the next index to use "by hand" instead of relying
on the modulo operator.
Warner Losh [Fri, 14 Mar 2014 20:20:32 +0000 (20:20 +0000)]
NanoBSD has a utility shell script called save_cfg which helps keep
/cfg updated with the modified configuration files in /etc. I have
written an improved version with the following features:
* Recurses directories.
* Only requires file arguments the first time the file/directory is
* added to /cfg.
* Handles file deletions.
PR: 145962, 157533
Submitted by: Aragon Gouveia and Alex Bakhtin
Julio Merino [Fri, 14 Mar 2014 12:55:06 +0000 (12:55 +0000)]
Remove unnecessary svn:executable property from source file.
The atf cp_test.sh sample file should have never been marked executable in
the first place because this file needs to be "built" first before being
usable.
Julio Merino [Fri, 14 Mar 2014 12:52:55 +0000 (12:52 +0000)]
Move FreeBSD Test Suite-specific code to a suite.test.mk file.
The new suite.test.mk file contains all the logic needed to install test
programs under /usr/tests/ and to support Kyua as the run-time engine.
This file is included by default by bsd.test.mk so Makefiles do not need
to care about its existence.
Specific Makefiles can define NOT_FOR_TEST_SUITE to indicate that whatever
test programs they are building are not supposed to be installed under
/usr/tests/ nor run by Kyua. (The effect of passing this setting is that
suite.test.mk is simply not included.)
NOT_FOR_TEST_SUITE should never be used by Makefiles in the base system.
This functionality is provided so that third-parties can hook in their
own test code, with different semantics, if they wish. This was asked
for by sjg@.
Julio Merino [Fri, 14 Mar 2014 08:56:19 +0000 (08:56 +0000)]
Make bsd.test.mk the only public mk fragment for the building of tests.
Change {atf,plain,tap}.test.mk to be internal implementation details of
bsd.test.mk. Makefiles that build tests should now only include bsd.test.mk
and declaratively specify what they want to build, without worrying about
the internal implementation of the mk files.
The reason for this change is to permit building test programs of different
interfaces from a single directory, which is something I had a need for
while porting tests over from src/tools/regression/.
Additionally, this change makes it possible to perform some other requested
changes to bsd.test.mk in an easier manner. Coming soon.
Kevin Lo [Fri, 14 Mar 2014 06:38:22 +0000 (06:38 +0000)]
Reset the bit of the R92C_MCUFWDL associated with checksum report
before loading firmware page. It may fix this problem:
"urtwn0: timeout waiting for checksum report"
Gleb Smirnoff [Fri, 14 Mar 2014 06:29:43 +0000 (06:29 +0000)]
Remove AppleTalk support.
AppleTalk was a network transport protocol for Apple Macintosh devices
in 80s and then 90s. Starting with Mac OS X in 2000 the AppleTalk was
a legacy protocol and primary networking protocol is TCP/IP. The last
Mac OS X release to support AppleTalk happened in 2009. The same year
routing equipment vendors (namely Cisco) end their support.
Thus, AppleTalk won't be supported in FreeBSD 11.0-RELEASE.
Devin Teske [Fri, 14 Mar 2014 03:42:05 +0000 (03:42 +0000)]
Rewrite usermgmt -- hooking it into the scripting system with dispatch
commands addUser, deleteUser, and editUser. Getting rid of the awkward-
to-use `userinput' bolt-on which Ron and I talked about rewriting.
Gleb Smirnoff [Fri, 14 Mar 2014 02:58:48 +0000 (02:58 +0000)]
Remove IPX support.
IPX was a network transport protocol in Novell's NetWare network operating
system from late 80s and then 90s. The NetWare itself switched to TCP/IP
as default transport in 1998. Later, in this century the Novell Open
Enterprise Server became successor of Novell NetWare. The last release
that claimed to still support IPX was OES 2 in 2007. Routing equipment
vendors (e.g. Cisco) discontinued support for IPX in 2011.
Thus, IPX won't be supported in FreeBSD 11.0-RELEASE.
Devin Teske [Fri, 14 Mar 2014 02:50:32 +0000 (02:50 +0000)]
Fix future namespace issues for functions taking $var_to_set -- functions
taking a variable to set need to make sure they protect their locals; if
$var_to_set positional argument coincides with a local the expected call
to `setvar' will fail to reach outside of the function's namespace. When
such collisions are experienced (as I did in the rewrite of usermgmt) the
solution is to append a full or abbreviated version of the function name
to the local (ultimately eliminating collisions). This is rarely needed
and only occurs when you have a lot of like-named functions that pass
very similar $var_to_set positional arguments to each other (such as-is
the case with an expansive library such as `dialog.subr').
Devin Teske [Fri, 14 Mar 2014 02:37:39 +0000 (02:37 +0000)]
Remove indexfile from debug statement as it is already logged by
f_index_menusel_command() used just-prior to this debug statement.
Also, log the arguments being passed to the resword.
Ian Lepore [Fri, 14 Mar 2014 00:49:02 +0000 (00:49 +0000)]
Fix an uninitialized variable error I perpetrated when splitting some
code into a separate function. Pass the missing value from main() to
the probe_disks() function.
Re-format the license to conform to our BSD license template as much
as possible. This does not change the wording in any way.
Remove the 3rd clause ("advertising clause") of the BSD license as
permitted by the University of Berkeley on July 22, 1999. While the
clause itself mentions Lawrence Berkeley Laboratory, UCB is the sole
copyright holder of this file.