Commit Graph

487 Commits

Author SHA1 Message Date
ghen 41f841e610 Add support for the Colemak keyboard layout variant, see http://colemak.com 2008-05-21 07:39:24 +00:00
martin 592397db3f Move to standard TNF 2 clause license 2008-05-04 12:59:38 +00:00
cegger d9b775927c hpqlb(4): driver for HP Quick Launch buttons - found on HP Pavilion Notebooks 2008-05-01 20:18:18 +00:00
ad 1498ad220e Make various bits of debug code compile again. 2008-04-30 14:07:13 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
cegger 4bd4cc6d3d aprint_verbose -> aprint_verbose_dev 2008-04-27 05:15:45 +00:00
ad 6d70f903e6 Network protocol interrupts can now block on locks, so merge the globals
proclist_mutex and proclist_lock into a single adaptive mutex (proc_lock).
Implications:

- Inspecting process state requires thread context, so signals can no longer
  be sent from a hardware interrupt handler. Signal activity must be
  deferred to a soft interrupt or kthread.

- As the proc state locking is simplified, it's now safe to take exit()
  and wait() out from under kernel_lock.

- The system spends less time at IPL_SCHED, and there is less lock activity.
2008-04-24 15:35:27 +00:00
cegger 3069a1f144 use aprint_*_dev and device_xname 2008-04-05 15:50:49 +00:00
cube d94699ecbb Split device_t and softc for wskbd(4), wsmouse(4) and that creepy wsmux(4). 2008-03-25 00:49:19 +00:00
drochner 3678498d59 -add a function to vga_post which can be called from DDB to get a
usable VGA console ("call ddb_vgapost")
-allow to switch from/to screens occupied by an X server if the graphics
 device is console and in polling mode (ie DDB)
This together allows to get a DDB session on a VGA console if the
system crashed while X11 was running.
As long as the protocol to tell X servers about virtual screen switches
is as primitive as it is, it is unsafe to restart an X session afterwards.
So this is basically for crash analysis.
2008-03-12 23:26:18 +00:00
rmind c6186face4 Welcome to 4.99.55:
- Add a lot of missing selinit() and seldestroy() calls.

- Merge selwakeup() and selnotify() calls into a single selnotify().

- Add an additional 'events' argument to selnotify() call.  It will
  indicate which event (POLL_IN, POLL_OUT, etc) happen.  If unknown,
  zero may be used.

Note: please pass appropriate value of 'events' where possible.
Proposed on: <tech-kern>
2008-03-01 14:16:49 +00:00
dyoung f580a3a869 Use PMF_FN_ARGS, PMF_FN_PROTO. 2008-02-29 06:13:39 +00:00
dyoung 9ab63bea7b Do not return EBUSY if this is the console. 2008-02-28 16:54:48 +00:00
dyoung c7d0c816a2 Return EBUSY and do not detach if we are the console.
Cosmetic: use device_t and accessors.  Temporarily use PMF_FN_PROTO,
PMF_FN_ARGS.
2008-02-22 22:29:16 +00:00
drochner 0c3c5106cb -Don't detach/attach the X server in the pmf suspend/resume functions
which are called somewhere in the middle of system suspend. Since the
 X server accesses hardware directly it is outside our control whether
 the devices it accesses are already/still suspended or not, so the only
 way is to detach it before any device suspends and re-attach after
 everything is awake again.
-For that, export a function ("wsdisplay_handlex" for now) which is
 to be called from central suspend/resume code.
-The right way to handle the (normally impossible) case that the X
 server is not detached on suspend is to return an error which should
 abort the suspend process. pmf doesn't yet handle errors of device
 suspend handlers, so as a temporary measure try to suspend anyway,
 to get at least a text console.
-Improve error handling of X server attach/detach and maintain a flag
 which tracks whether the X server is really active.
2008-02-20 22:33:18 +00:00
drochner 85b70008e0 make the mutex securing a flag which controls screen switched adaptive
for sanity -- it is not yet in a code path which is called from
keyboard interrupt handlers
2008-02-13 19:01:35 +00:00
drochner 84c211c56c On suspend/resume, just detach/attach the X server (or whatever might
be using the "syncops" protocol) rather than doing a full switch
to virtual screen 1. The latter doesn't have the expected result if
the X server is running on screen 1, and is too much policy for inside
the kernel anyway.
Introduce a mutex+condvar to synchronize these operations, to replace
the spltty()/tsleep(). (for now only used by the new functions,
should be extended to the normal vt switching code)
2008-01-14 21:38:50 +00:00
drochner 8644062c1c restructure things a bit so that proclist_mutex is held between the
p_find() and the psignal() which is its purpose after all
2008-01-14 21:17:00 +00:00
joerg 1c47f4bb86 Switch to console on suspend and shutdown, switch back to where the
system was before on resume. This is the second attempt and got more
complicated due to the async nature of VT_ACTIVE. After the initial
switch, check that we ended up on the first screen and if not, wait for
the switch to happen.
2007-12-13 15:14:48 +00:00
joerg 5141501598 Stop the key pressed timeout on suspend to avoid virtually hanging keys,
e.g. when calling sysctl -w machdep.sleep_state=3 manually.
2007-12-13 14:49:42 +00:00
jmcneill b36c96248a Wups, pmf_class_input_deregister is private; use pmf_device_deregister
instead
2007-12-10 01:13:38 +00:00
jmcneill cda2869251 Deregister input class handler on detach. 2007-12-10 01:11:49 +00:00
jmcneill 4c1d81b2b5 Merge jmcneill-pm branch. 2007-12-09 20:27:42 +00:00
pooka 4e38160d4d Do not "return 1" from kqfilter for errors. That value is passed
directly to the userland caller and results in a mysterious EPERM.
Instead, return EINVAL or something else sensible depending on the
case.
2007-12-05 17:19:46 +00:00
jmcneill 4fbe23fdd0 aprintify 2007-12-01 04:50:50 +00:00
ad dc26833bb6 - Factor out too many copies of the same bit of tty code.
- Fix another tty signalling/wakeup problem.
2007-11-19 18:51:36 +00:00
dogcow 96d14f0973 If you're going to use device_t, may as well include sys/device.h; unb0rks
the build for sparc{,64}.
2007-10-19 08:57:50 +00:00
joerg 6c51962b6c Calling device_private once is enough. Reported by macallan@ 2007-10-18 21:08:18 +00:00
joerg d238692c3e Initialise the callbacks for tty.t_rstrt_ch in ttymalloc
as all drivers but Sun/SPARC's kd.c use the same arguments.
Separate callout_reset into callout_schedule and the initial
callout_setfunc using that.
2007-10-18 18:54:56 +00:00
joerg e4a56b252c Use aprint API for output and convert to device_t/softc separation. 2007-10-18 18:09:52 +00:00
joerg 002c91440c Always declare wskbd_repeat to fix build without wsdisplay. 2007-10-18 14:51:25 +00:00
joerg 54575b3cd5 Use callout_setfunc/callout_schedule and don't cast function pointers. 2007-10-17 22:13:56 +00:00
joerg 55e50c10e7 Use callout_setfunc/callout_schedule instead of callout_reset.
Use mstohz for the calculations.
2007-10-16 21:06:09 +00:00
macallan 6a9b8ff83c add type for Fujitsu AG-10e 2007-08-27 02:01:23 +00:00
macallan 75a9d6c832 add scrollback support 2007-08-06 03:11:32 +00:00
macallan bf32d3c292 set the scrollmode flag when entering/leaving scroll mode, send scroll reset
when leaving
2007-08-06 03:07:52 +00:00
rumble 64dd04152b Set the 'ri' pointer before use. 2007-07-28 22:35:56 +00:00
mjf 05619021ad Implement bounds checking in some places in display driver code to avoid
the possibility of a local user panic.
2007-07-28 20:28:56 +00:00
nonaka 2462aff88e add WSDISPLAY_TYPE_PXALCD for PXA2x0 LCD controller. 2007-07-26 12:17:14 +00:00
macallan 6b4ea0adbe add WSDISPLAY_TYPE_CRIME for the SGI O2's graphics hardware 2007-07-26 01:59:07 +00:00
ad 88ab7da936 Merge some of the less invasive changes from the vmlocking branch:
- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
2007-07-09 20:51:58 +00:00
macallan 02be3c78f3 add WSDISPLAY_TYPE_GENFB 2007-04-11 04:09:10 +00:00
mishka 2f5bd28732 Revert previous commit until further investigation because it is
known as problematic.  Some problems obscured are dead Del key (I
can reproduce this with wscons scroll support) and panic (seen by
<elad> only).
2007-04-04 14:50:21 +00:00
mishka 933b97ecac Implement locking switcher for alternative layots (many languages
are based on completely different alphabet, and typesetting with
one of modifiers pressed all the time is just a PITA). See
http://mail-index.netbsd.org/tech-kern/2007/03/29/0002.html for
usage details.

While here, perform the following small cleanups:
- KS_Cmd_Scroll* execution should be explicitly interrupted with 'break'.
- Some 'human' cleanups in ksym extraction algorithm (no func. changes).
- Add a note: implemented ksym translation isn't sufficient for l10n.
2007-04-02 10:01:31 +00:00
drochner 9916a76d2e It was probably not a good idea to put that scroll stuff to accessops.
But now that it is there, keep it from crashing the box if there is
no valid focus screen.
2007-03-05 16:06:52 +00:00
christos 53524e44ef Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
ad b07ec3fc38 Merge newlock2 to head. 2007-02-09 21:55:00 +00:00
hubertf eda05c6413 Remove more duplicate headers.
Patch by Slava Semushin <slava.semushin@gmail.com>

Again, this was tested by comparing obj files from a pristine and a patched
source tree against an i386/ALL kernel, and also for src/sbin/fsck_ffs,
src/sbin/fsdb and src/usr.sbin/makefs. Only changes in assert() line numbers
were detected in 'objdump -d' output.
2007-01-29 01:52:43 +00:00
macallan cf6c447564 add #defines for ADB and pseudo mice 2007-01-19 20:59:45 +00:00
cube 4cdd8aada6 Complete initializers so those files compile. 2007-01-13 18:42:45 +00:00