ray [Wed, 13 Nov 2013 12:32:41 +0000 (12:32 +0000)]
o Simplify POS_INDEX macro calculation.
o New macro POS_COPY to copy between term_pos_t.
o Add vtbuf_wth/vtbuf_htw helpers, to translate between screen coordinates and
circular history buffer location.
o Update vtbuf_iscursor to mark region selected by mouse.
o New helper vtbuf_flush_mark, to update regions where copy/paste mark changed.
o New method vtbuf_get_marked_len to get storage size for paste buffer.
o vtbuf_extract_marked fill (caller allocated buffer) with selected region data.
o Simplify mouse handler for copy/paste, and use vtbuf_flush_mark to update.
o New method vtbuf_scroll_mode, to help indicate Scroll mode by hiding cursor.
o Update header with new vtbuf methods.
o Add new vt_driver method vd_markedwin, to hold last window with selection.
o Enable paste support in core module.
Sponsored by: The FreeBSD Foundation
Pointed by: Claude Buisson <clbuisson@orange.fr> (Scroll mode indication)
ray [Mon, 11 Nov 2013 22:07:56 +0000 (22:07 +0000)]
Add kern.vt.suspendswitch tunable. This will allow to disable default behavior
(switch to VT0 on suspend, switch back on resume).
If 0 - disabled, other values - enabled.
Requested by: jhb
Sponsored by: The FreeBSD Foundation
ray [Mon, 11 Nov 2013 13:25:49 +0000 (13:25 +0000)]
Update vd_bitbltchr_t type to handle operation mask (to not touch pixels which
is not defined in mask) and bpl (bytes per source line).
Only vt_fb driver handle handle bpl yet.
Add protector for case when blitting image can be drawn partially out of screen,
like mouse cursor.
Mouse cursor and its movements works fine, copy/paste not yet.
ray [Mon, 11 Nov 2013 12:34:30 +0000 (12:34 +0000)]
o Update vt_flush to care about mouse pointer.
o Sort variable declarations.
o Disable mouse support for DDB.
o Expose region to update on old mouse position.
o Draw mouse cursor on current position.
There is some extra bits for calculation of size to copy bitmap to screen.
It is not supported by drivers, but will be changed in following commits.
ray [Mon, 11 Nov 2013 12:15:52 +0000 (12:15 +0000)]
o Remove include of sys/mouse.h, it is included from vt.h now.
o Call vt_mouse_event method, to notify VT(9) about mouse events.
o Add empty MOUSE_MOUSECHAR ioctl handler.
o Remove trailing whitespace.
ray [Mon, 11 Nov 2013 11:30:47 +0000 (11:30 +0000)]
Use opt_syscons.h to get defines.
Define max number of windows as VT_MAXWINDOWS if defined, or as MAXCONS, or 12.
Define VT_MOUSE_PASTEBUTTON and VT_MOUSE_EXTENDBUTTON if defined
SC_TWOBUTTON_MOUSE or VT_TWOBUTTON_MOUSE.
ray [Thu, 7 Nov 2013 21:08:52 +0000 (21:08 +0000)]
Handle suspend/resume. Switch to console window before suspend, switch back on
resume. That fix issue with broken Xorg image after resume.
Fix some style whilst here.
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.
markj [Tue, 5 Nov 2013 03:23:54 +0000 (03:23 +0000)]
Modify the libproc breakpoint add/remove functions to stop the target
process if it has not already been stopped, since this is required for
ptrace(2) to work.
libdtrace does not seem to stop target processes before trying to remove
their breakpoints, so we were previously failing to remove the breakpoint
on r_debug_state() in rtld. This was causing processes to die with SIGTRAP
if they called dlopen(3) after dtrace(1) had detached.
ian [Tue, 5 Nov 2013 02:57:34 +0000 (02:57 +0000)]
Call initarm_lastaddr() later in the init sequence, after establishing
static device mappings, rather than as the first of the initializations
that a platform can hook into. This allows a platform to allocate KVA
from the top of the address space downwards for things like static device
mapping, and return the final "last usable address" result after that and
other early init work is done.
Because some platforms were doing work in initarm_lastaddr() that needs to
be done early, add a new initarm_early_init() routine and move the early
init code to that routine on those platforms.
Rename platform_devmap_init() to initarm_devmap_init() to match all the
other init routines called from initarm() that are designed to be
implemented by platform code.
Add a comment block that explains when these routines are called and the
type of work expected to be done in each of them.
neel [Mon, 4 Nov 2013 23:25:07 +0000 (23:25 +0000)]
Remove the 'vdev' abstraction that was meant to sit on top of device models
in the kernel. This abstraction was redundant because the only device emulated
inside vmm.ko is the local apic and it is always at a fixed guest physical
address.
ian [Mon, 4 Nov 2013 22:45:26 +0000 (22:45 +0000)]
Move remaining code and data related to static device mapping into the
new devmap.[ch] files. Emphasize the MD nature of these things by using
the prefix arm_devmap_ on the function and type names (already a few of
these things found their way into MI code, hopefully it will be harder to
do by accident in the future).
dim [Mon, 4 Nov 2013 21:54:56 +0000 (21:54 +0000)]
For C++ programs, don't emit any explicit dependency to libstdc++.a or
libc++.a during the early build stages (bootstrap-tools, build-tools,
cross-tools), since it is not possible to know in advance which C++
library is available on the host system.
Instead, just use the bootstrap compiler's built-in default. This
should eventually make it possible to build stable/9 on head, or on
stable/10, which ship without libstdc++ by default.
dteske [Mon, 4 Nov 2013 20:28:10 +0000 (20:28 +0000)]
Defer loading of kernel and modules if the beastie menu is enabled. Add a
kernel selection menu to the beastie menu. List of kernels is taken from
`kernels' in loader.conf(5) as a space (or comma) separated list of names
to display (up to 9). If not set, default value is "kernel kernel.old".
Does not validate that kernels exist because the next enhancement will be
to allow selection of the root device.
ian [Mon, 4 Nov 2013 19:44:37 +0000 (19:44 +0000)]
Begin reducing code duplication in arm pmap.c and pmap-v6.c by factoring
out common code related to mapping device memory into a new devmap.c file.
Remove the growing duplication of code that used pmap_devmap_find_pa() and
then did some math with the returned results to generate a virtual address,
and likewise in reverse to get a physical address. Now there are a pair
of functions, arm_devmap_vtop() and arm_devmap_ptov(), to do that. The
bus_space_map() implementations are rewritten in terms of these.
eadler [Mon, 4 Nov 2013 19:05:31 +0000 (19:05 +0000)]
Use OpenBSD's revamped description of strlcpy and strlcat.
This explanation is supposed to be simpler and better. In particular
"comparing it to the snprintf API provides lots of value, since it raises the
bar on understanding, so that programmers/auditors will a better job calling
all 3 of these functions."
sbruno [Mon, 4 Nov 2013 18:15:45 +0000 (18:15 +0000)]
Quiesce warning around gcc_assert() for an inline macro that uses
a static variable. This code has been moved around in gcc, but is still in
use in the latest trunk version of the compiler.
gnu/lib/libgcc/../../../contrib/gcc/unwind-dw2.c:208:36:
warning: static variable 'dwarf_reg_size_table' is used in an inline
function with external linkage [-Wstatic-in-inline]
gcc_assert (index < (int) sizeof(dwarf_reg_size_table));
sbruno [Mon, 4 Nov 2013 16:52:27 +0000 (16:52 +0000)]
Quiesce warning about unused argument in call to rl_message() by wrapping
this call with the same #if defined (PREFER_STDARG) directive as in display.c
Using -E to compile display.c/search.c shows that this is the code chosen by
the build when we create libreadline