ian [Thu, 7 Nov 2013 22:50:42 +0000 (22:50 +0000)]
Instead of modeling the kernel-tools build after the bootstrap tools, build
kernel tools the way cross-tools get built. This seems to result in the
tool getting installed in the right place. It also seems more correct in
retrospect, because if a tool emitted code or binary data as part of
building the kernel, it should do so in target-specific ways (endianess,
architecture, whatever). That issue is moot for aicasm, our only current
tool, but it still seems to be more correct in principle.
dteske [Thu, 7 Nov 2013 22:47:52 +0000 (22:47 +0000)]
Fix a bug that prevented `-d' from working as-documented in sysrc(8).
Rather, prevent a bunch of debugging information from spewing onto the
screen when using the `describe' flag (misinterpreted as `debug' by
the automatatic initialization routines).
dteske [Thu, 7 Nov 2013 21:52:04 +0000 (21:52 +0000)]
Extend loader_delay as-documented in beastie.4th(8) and delay.4th(8), making it available to architectures that do not use or load the beastie
menu. This is reported to save headaches on some PPC systems where unload
followed by load does not produce the desired results wherein if-given
the opportunicy to abort the initial loading sequence, you can customize
the first load.
Reviewed by: nwhitehorn, kan
Discussed on: -current
dteske [Thu, 7 Nov 2013 21:38:46 +0000 (21:38 +0000)]
Use `pkg -vv' to obtain ABI for validating a chosen media server (done
prior to diving head-long into a pkg-update(8), et. al). This should
also be more future-proof than what was being done just before this.
gjb [Thu, 7 Nov 2013 18:53:55 +0000 (18:53 +0000)]
Add a 'mini-memstick.img' release target, which will use the
'bootonly.iso' components to create a smaller memory stick image.
This is useful for system recovery, where a full memstick.img image
is not necessarily needed (or wanted). In addition, it is possible to
do bootonly-style installation, where the base.txz, kernel.txz, etc.
are fetched from a remote source.
Provide backwards-compatible target (mini-memstick), to keep in sync
with the targets documented in release/Makefile.
Prompted by: wblock
MFC after: 1 week
X-MFC-after: 10.0-RELEASE
Sponsored by: The FreeBSD Foundation
dteske [Thu, 7 Nov 2013 10:30:20 +0000 (10:30 +0000)]
Use dialog(1) to obtain maximum-size; stty fails when running in a pipe-
chain. This allows dialogs to reach full size even when executed as an
rvalue operand to a pipe (e.g., cat file | bsdconfig -f-).
dteske [Thu, 7 Nov 2013 10:28:12 +0000 (10:28 +0000)]
Add an f_eval_catch() function for debugging individual commands in a
series of commands. Accepts the `-d' flag as a first argument to skip
displaying messages in a dialog box. The command is logged as it
appears to the shell prior to the first pass of parameter expansion to
allow copy/pasting into a real shell (opposed to simply echo'ing the
command which would produce debug output that has undergone at least one
pass of parameter expansion, thus no-longer copacetic for copy/paste).
Takes printf(1) style syntax and a utility identifier for error messages.
dteske [Thu, 7 Nov 2013 10:23:37 +0000 (10:23 +0000)]
Add an f_show_err() function -- acts pretty much the same as f_show_msg()
except it stylizes the msgbox widget to indicate an Error has occurred by
setting an appropriate title and default message.
dteske [Thu, 7 Nov 2013 10:20:19 +0000 (10:20 +0000)]
Add global DEBUG_INITIALIZE_FILE environment variable for controlling
whether the debugFile is truncated upon initialization (useful for when
children implicitly re-initialize debugging and you want children to
append to your existing debugFile).
hselasky [Thu, 7 Nov 2013 07:22:51 +0000 (07:22 +0000)]
- Use libusb20_strerror() function instead of custom usb_error() one.
- Rename "aux.[ch]" to "util.[ch]" which is a more common name for
utility functions and allows checkout on some non-FreeBSD systems
where the "aux.*" namespace is reserved.
- Fix some compile warnings while at it.
ian [Thu, 7 Nov 2013 04:31:21 +0000 (04:31 +0000)]
Do not build aicasm with the cross-tools/kernel-toolchain, instead add a
proper kernel-tools step/target modeled after the world build-tools stuff.
This is a re-do of r257730 which was backed out in r257734, but this time
it's one byte smaller... a leftover trailing backslash resulted in a .for
loop with no rules, so no compiler stuff got built and later steps built
with the wrong toolset.
kargl [Wed, 6 Nov 2013 23:44:52 +0000 (23:44 +0000)]
* Use "math.h" instead of <math.h>.
* Use bit twiddling. This requires inclusion of math_private.h
and inclusion of float.h in s_roundl.c. Raise invalid exception.
* Use literal integer constants where possible. Let the compiler
do the appropriate conversion.
* In s_roundf.c, use an F suffix on float constants instead of
promoting float to double and then converting the result back
to float. In s_roundl.c, use an L suffix.
* In s_roundl.c, use the ENTERI and RETURNI macros. This requires
the inclusion of fpmath.h and on __i386__ class hardware ieeefp.h.
jmg [Wed, 6 Nov 2013 19:14:49 +0000 (19:14 +0000)]
make it so that from/to can be missaligned as it can happen (the geli
regression manages to do it)... We use a packed struct to coerce
gcc/clang into producing unaligned loads (there is not packed pointer
attribute, otherwise this would be easier)...
use _storeu_ and _loadu_ when using the structure is overkill...
be better at using types properly... Since we allocate our own key
schedule and make sure it's aligned, use the __m128i type in various
arguments to functions...
clang ignores __aligned on prototypes and gcc errors on them, leave them
in comments to document that these function arguments are require to be
aligned...
about all that changes is movdqa -> movdqu from reading the diff of the
disassembly output...
Noticed by: symbolics at gmx.com
MFC after: 3 days
dteske [Wed, 6 Nov 2013 18:26:38 +0000 (18:26 +0000)]
Add support for dereferencing SRV records via f_host_lookup(). Takes the
media choice into consideration for determining the appropriate SRV records
to query (e.g., _http._tcp, _ftp._tcp, _nfs.tcp, _nfs.udp, etc.).
hselasky [Wed, 6 Nov 2013 15:32:37 +0000 (15:32 +0000)]
Implement a working write region function to speed up loading of the
firmware. You can test this change by switching the "#if 1" statement
right above in the patched code to "#if 0" !
nwhitehorn [Wed, 6 Nov 2013 14:33:37 +0000 (14:33 +0000)]
Make OF_nextprop() work correctly for FDT by using the libfdt
fdt_next_property_offset() API. The old code would sometimes (e.g. on
the device tree supplied by the RB800 boot loader) get confused and stop
partway through listing properties.
pjd [Wed, 6 Nov 2013 07:46:10 +0000 (07:46 +0000)]
- Remove mac_get_fd/mac_set_fd - those are not syscalls. The __mac_get_fd() and
__mac_set_fd() syscalls are listed earlier.
- Correct typo in syscall name. It should be sched_rr_get_interval,
not sched_rr_getinterval.
Submitted by: David Drysdale <drysdale@google.com>
MFC after: 3 days
imp [Wed, 6 Nov 2013 05:26:15 +0000 (05:26 +0000)]
Remove the gross hack for the Octeon Simple Executive to the least
intrusive place for it to be: the octeon std file.
Fix a comment while I'm here.
Allow for future architectural specific flags.
gjb [Wed, 6 Nov 2013 04:38:49 +0000 (04:38 +0000)]
Revert r257730:
Make head/ buildable again, instead of spewing garbage like:
/src/gnu/lib/csu/../../../contrib/gcc/config/rs6000/crtsavres.asm:280:
Error: no such instruction: `lwz 28,-16(11)'
grehan [Wed, 6 Nov 2013 00:25:17 +0000 (00:25 +0000)]
Add the VM name to the process name with setproctitle().
Remove the VM name from some of the thread-naming calls
since it is now in the proc title.
Slightly modify the thread-naming for the net and block
threads.
This improves readability when using top/ps with the -a
and -H options on a system with a large number of bhyve VMs.
jhb [Tue, 5 Nov 2013 19:49:53 +0000 (19:49 +0000)]
Don't explicitly invoke ifn_start on new child interfaces (vaps and
subinterfaces) after they are created. Interfaces are already started
by devd invoking /etc/pccard_ether when they are created, so the explicit
calls in childif_create() resulted in interfaces being started twice.
Note that interfaces created via cloned_interfaces are not explicitly
started but depend on the devd mechanism already.
hselasky [Tue, 5 Nov 2013 18:27:25 +0000 (18:27 +0000)]
Protect the "ratectl_ch" callout in the "run" driver by the "run"
softc's "sc->sc_mtx" mutex. Currently the callout was marked
multi-processor safe, which is fine, but it is better to
start/stop/reset callouts while holding the "run" drivers own
mutex. While at it add a missing "ULL" at end of the 64-bit unsigned
integer constant.
nwhitehorn [Tue, 5 Nov 2013 13:48:34 +0000 (13:48 +0000)]
Teach nexus(4) about Open Firmware (e.g. FDT) on ARM and MIPS, retiring
fdtbus in most cases. This brings ARM and MIPS more in line with existing
Open Firmware platforms like sparc64 and powerpc, as well as preventing
double-enumeration of the OF tree on embedded PowerPC (first through nexus,
then through fdtbus).
This change is also designed to simplify resource management on FDT platforms
by letting there exist a platform-defined root bus resource_activate() call
instead of replying on fdtbus to do the right thing through fdt_bs_tag.
The OFW_BUS_MAP_INTR() and OFW_BUS_CONFIG_INTR() kobj methods are also
available to implement for similar purposes.
Discussed on: -arm, -mips
Tested by: zbb, brooks, imp, and others
MFC after: 6 weeks
glebius [Tue, 5 Nov 2013 07:44:15 +0000 (07:44 +0000)]
Rewrite in_control(), so that it is comprehendable without getting mad.
o Provide separate functions for SIOCAIFADDR and for SIOCDIFADDR, with
clear code flow from beginning to the end. After that the rest of
in_control() gets very small and clear.
o Provide sx(9) lock to protect against parallel ioctl() invocations.
o Reimplement logic from r201282, that tried to keep localhost route in
table when multiple P2P interfaces with same local address are created
and deleted.
glebius [Tue, 5 Nov 2013 07:36:17 +0000 (07:36 +0000)]
In complemence to ifa_add_loopback_route() and ifa_del_loopback_route()
provide function ifa_switch_loopback_route() that will be used in case when
an interface address used for a loopback route goes away, but we have another
interface address with same address value and want to preserve loopback
route.
glebius [Tue, 5 Nov 2013 07:32:09 +0000 (07:32 +0000)]
Remove net.link.ether.inet.useloopback sysctl tunable. It was always on by
default from the very beginning. It was placed in wrong namespace
net.link.ether, originally it had been at another wrong namespace. It was
incorrectly documented at incorrect manual page arp(8). Since new-ARP commit,
the tunable have been consulted only on route addition, and ignored on route
deletion. Behaviour of a system with tunable turned off is not fully correct,
and has no advantages comparing to normal behavior.
edwin [Tue, 5 Nov 2013 06:32:23 +0000 (06:32 +0000)]
MFV of 255902, tzdata2013f
MFV of 257651, tzdata2013h
tzdata2013f
- Jordan goes to winter time on the last Friday in October.
- Tocantins in Brazil will not go into summer time in October.
- Indonesian time zones renames.
- Lots of cleanups in with regarding to links and historical data.
tzdata2013h
- Libya didn't go back to DST.
- Fix Morocco 2038 issue.
- Brazil/Acre and Western Amazonas are chaning timezones.
kib [Tue, 5 Nov 2013 06:18:50 +0000 (06:18 +0000)]
Do not coalesce if the swap object belongs to tmpfs vnode. The
coalesce would extend the object to keep pages for the anonymous
mapping created by the process. The pages has no relations to the
tmpfs file content which could be written into the corresponding
range, causing anonymous mapping and file content aliasing and
subsequent corruption.
Another lesser problem created by coalescing is over-accounting on the
tmpfs node destruction, since the object size is substracted from the
total count of the pages owned by the tmpfs mount.
Reported and tested by: bdrewery
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
markj [Tue, 5 Nov 2013 06:13:46 +0000 (06:13 +0000)]
Use suword32 and suword64 instead of copyout(9). This fixes a bug in the
emulation of the call instruction caused by reversing the uaddr and kaddr
arguments when copying data out to userland: the suword* functions take the
uaddr as the first argument whereas copyout(9) takes the kaddr as the first
argument. This also partially undoes the fixes from r257143.
ian [Tue, 5 Nov 2013 04:30:55 +0000 (04:30 +0000)]
Add new helper routines for arm static device mapping. The new code
allocates kva space from the top down for the device mappings and builds
entries in an internal table which is automatically used later by
arm_devmap_bootstrap(). The platform code just calls the new
arm_devmap_add_entry() function as many times as it needs to (up to 32
entries allowed; most platforms use 2 or 3 at most).
There is also a new arm_devmap_lastaddr() function that returns the lowest
kva address allocated; this can be used to implement initarm_lastaddr()
which is used to initialize vm_max_kernel_address.
The new code is based on a similar concept developed for the imx family
SoCs recently. They will soon be converted to use this new common code.