Commit Graph

69 Commits

Author SHA1 Message Date
thorpej b75a007d9f Add trailing ; to CFATTACH_DECL. 2002-10-02 16:51:16 +00:00
thorpej 90c48d2563 Use CFATTACH_DECL(). 2002-10-01 01:25:25 +00:00
thorpej bf97c13c6c Declare all cfattach structures const. 2002-09-27 20:41:46 +00:00
provos 0f09ed48a5 remove trailing \n in panic(). approved perry. 2002-09-27 15:35:29 +00:00
gehenna 77a6b82b27 Merge the gehenna-devsw branch into the trunk.
This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

	device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
  by using this grammer.

- Added the new naming convention.
  The name of the device switch must be <prefix>_[bc]devsw for auto-generation
  of device switch tables.

- The backward compatibility of loading block/character device
  switch by LKM framework is broken. This is necessary to convert
  from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
  We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
  the LKM framework will refer it to assign device major number dynamically.
2002-09-06 13:18:43 +00:00
christos 71dcc987cd PR/17402: Add wsmoused support by providing get/set char and events. 2002-06-26 23:05:33 +00:00
hannken ad4a51c35b Rename WSDISPLAYIO_USEFONT to WSDISPLAYIO_SFONT.
Approved by Matthias Drochner <drochner@netbsd.org>.
2002-04-07 09:25:47 +00:00
atatat 31144d9976 Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command".  ERESTART is -1, which can lead to
confusion.  ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4.  No ioctl code should now return -1 anywhere.  The
ioctl() system call is now properly restartable.
2002-03-17 19:40:26 +00:00
takemura 29e873a235 Added wsmux_set_display() to fix the problem that wskbd wan't connected
to any display if keyboard was attached before display and both aren't console.
2002-03-02 08:22:26 +00:00
lukem 139747fb15 add/cleanup RCSIDs 2001-11-13 06:17:46 +00:00
augustss 48ea68d3d9 Make wsdisplay_set_console_kbd() a little less twisted. 2001-11-10 17:14:51 +00:00
augustss 87746219bd Put in some tests to see if the input source is NULL before using it.
Suggested by Havard Eidnes <he@netbsd.org>.
2001-10-28 10:30:22 +00:00
augustss 546b6e4434 Cosmetics. 2001-10-27 13:52:57 +00:00
augustss 2f1f0a1702 Major rototilling of the wsmux code. No user visible changes (except that
many bugs have been fixed).
Changes:
The wskbd, wsmouse, and wsmux are now "sub-classes" of wsevsrc, which is
a source of ws events.  This make the structure of those drivers a little
more uniform.
Many bug fixes involving adding and removing devices from muxes.
When a kernel is configured without wsmux there will now be none (unlike
before where you got a console mux anyway).
The kernel now compiles with all combinations of ws devices present.
2001-10-24 14:07:31 +00:00
augustss 3527006336 Don't use wsmux_getmux() if we NWSMUX == 0. Fixes PR kern/14252.
This is only a stop gap measure until the real wsmux changed get in.
2001-10-15 21:51:33 +00:00
augustss 82e5e6ab85 ANSIfy. 2001-10-13 15:56:15 +00:00
augustss d701e45c14 Two changes to the wsmux code:
* Allow the wsmux used by wsdisplay for the keyboard(s) to be explicitely
  specified with the kbdmux locator.
* Allow keyboards and mice that have a mux to be opened in the regular way.
These changes should be totally backwards compatible.
2001-10-13 13:35:59 +00:00
jdolecek 57a49a2de0 introduce hard limit on maximum font size (WSDISPLAY_MAXFONTSZ - 512KB)
and keymap size (WSKBDIO_MAXMAPLEN - 64KB)
2001-08-05 11:26:52 +00:00
drochner 3df4a7a4a8 do this console device lookup thing the right way this time
(This "dev" argument to the console functions is nonsense - nothing
should depend on it.)
2001-05-18 11:49:21 +00:00
scw 2963ff5c58 Add `l_poll' to `struct linesw' and provide an xxxpoll() entry point
in each tty driver to indirect through it.

This allows tty line-disciplines to handle poll(2) system calls.
2001-05-02 10:32:08 +00:00
enami 25481ad786 Redo previous; we need to notify kbd driver. 2001-01-04 01:33:37 +00:00
enami 62a4aefda9 Avoid null pointer dereference so that boot -d works again. 2001-01-03 23:03:45 +00:00
enami 7eab063a4f Use device_lookup. 2001-01-03 23:00:24 +00:00
sato a2fe1adf2a for calling sc->sc_acessops->pollc,
use wsdisplay_cd.cd_devs[unit] in accessing wsdisplay_softc
instead of casting pointer.
XXX: i compiled it in i386, hpcmips, alpha.
2000-12-30 05:38:50 +00:00
mjacob e5482757b5 Fix at least alpha kernel builds. You can't pun a pointer to a dev_t on
alpha. This is also a bad idea. I really don't know the ws code at all
or I would just fix the whole issue.
2000-12-30 02:58:42 +00:00
sato 9785bf0526 notify console polling mode or not to lower level framebuffer driver.
notify EMUL mode or not to lower level framebuffer driver.
these may use framebuffer level hardware acceleration/software optimization.
2000-12-30 01:41:51 +00:00
ad 7433fb33e8 In wsdisplay_switchtoconsole(), ensure that the switch happens
synchronously. Suggested by drochner.
2000-12-04 13:22:17 +00:00
eeh 507aaec04c Adapt to the new line discipline scheme. 2000-11-02 00:01:44 +00:00
takemura dcfcbaf8ae - Add ioctl commands to wsdisplay which set/get some LCD status,
backlight, brightness and contrast.
- Add 9 command key symbols which make wskbd to call wsdisplay's
  iocontrol.
- Add special key map variant KB_MACHDEP. This variant does not
  have any real keymap but it's just a placeholder for machine dependent
  maps which will be overwrite by machine dependent keyboard driver.
2000-10-01 03:29:12 +00:00
lukem 6439b28202 * rename vga_stdscreen* -> vga_25lscreen*
* in vga_init(), set the screen type to WSCONS_DEFAULT_TYPE, which defaults
  to "80x25".
    XXX: the code currently makes no attempt to ensure that a font
	 with the appropriate width & height is available, effectively
	 limiting this default to either "80x25" or "80x24" at this
	 time.
* make wsdisplay_screentype_pick() non static, so that vga_init() can use it
2000-09-10 11:44:13 +00:00
takemura ed9f910cc8 Introduce WSDISPLAY_NULLSCREEN to allow low level device to detach control
process. Hpcmips frame buffer driver(hpcfb) call wsdisplay_switch with
WSDISPLAY_NULLSCREEN to notify user process of suspend/resume event.
2000-09-10 09:39:57 +00:00
simonb 889c658b5b Change the kernel mmap interface so that the offset to map is an
"off_t" and the return value is a "paddr_t" to allow mappings
at offsets past 2^31 bytes.  Somewhat inspired by FreeBSD, which
only changed the offset to a "vm_offset_t".

Includes updates for the i386, pc532 and sh3 mmmmap from Jason Thorpe.
2000-06-26 04:55:19 +00:00
augustss 169ac5b3c1 Remove register declarations. 2000-03-30 12:41:09 +00:00
thorpej fc96443d15 New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
  resource allocation.
- Insertion and removal of callouts is constant time, important as
  this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.
2000-03-23 07:01:25 +00:00
thorpej da4dc67d3e Add cnbell() support. 2000-03-06 21:37:16 +00:00
drochner b32647d4ea replace embedded _rcsid[] string by __KERNEL_RCSID(), remove _copyright[] 2000-01-05 11:19:36 +00:00
drochner 8996199a85 -allow the "show_screen" call to the display driver to complete
asynchronously, in the same style like the process attach/detach functions
-intercept the "cnpollc" call which originally went directly to the
 keyboard driver and keep track whether the console is in "polling" state
 (DDB!)
-pass a NULL callback to the screen switcher and the process attach/detach
 functions if the console is "polling", to tell them that asynchronous
 completion is forbidden
1999-12-06 18:52:23 +00:00
augustss 02faf8d588 Done something half sensible if a USB console keyboard is unplugged instead
of panic()ing.
XXX Untested.  I will test it the next time I can borrow an iMac.
1999-12-01 23:22:57 +00:00
mycroft 02bd5fa80e Split wsdisplay_usl_ioctl() into two functions -- one which is screen-dependent
and one which isn't.  The latter is now used for ttyEcfg, enabling the
VT-switching ioctls to work on it.  (This allows Linux X servers to work when
/emul/linux/dev/tty0 is linked to /dev/ttyEcfg.)
1999-10-19 00:03:18 +00:00
jdolecek d22624c1d2 add wsdisplay_switchtoconsole() to allow other parts of kernel to force
the wscons to switch to console; code taken from wsdisplay_shutdownhook(),
which is now just a wrapper around wsdisplay_switchtoconsole()
1999-10-12 16:47:41 +00:00
ad 71639bf8a7 At shutdown, switch to screen 0 on console display so that we see some
notification from the kernel.
1999-10-01 22:29:12 +00:00
jdolecek 61cf56ebf2 introduce new variable wsdisplay_defaultscreens (initialized to
WSDISPLAY_DEFAULTSCREENS or 0 if it's not defined) and use it instead
of WSDISPLAY_DEFAULTSCREENS as approptiate, so that number of screens
added on bootup is patchable

move printing of info about added screen into separate routine and
print just one message for all screens added in wsdisplay_common_attach(),
such as:
	wsdisplay0: screen 1-7 added (80x25, vt100 emulation)

while here, do minor const poisoning

Reviewed by: drochner
Tested by: jdolecek
1999-09-16 18:16:51 +00:00
augustss 23906f1d41 defopt COMPAT_14 1999-08-14 14:40:08 +00:00
augustss 3d3f77c49e Add the wsmux pseudo device. 1999-07-29 18:20:02 +00:00
drochner 9c0c171c30 add some #ifdefs to make it link w/o wskbd
(especially for vax)
1999-05-17 16:53:43 +00:00
drochner b7a56e27df Get rid of the timeout-driven wscons_glue stuff which caused a lot of
headaches.
Now console keyboard and display are connected at autoconfiguration time,
when the last of them is found. Other keyboards / displays remain
unconnected until a new ioctl (WSDISPLAYIO_SETKEYBOARD) is called.
1999-05-15 14:22:46 +00:00
drochner 10584c9e73 Sort out the inclusion of wscons source files: the files are only
compiled if the corresponding devices are configured.
(Files calling wscons functions have to check whether these are present.)
1999-05-14 16:01:11 +00:00
drochner 5575305f99 If no screen got the "focus" (which happens with serial console or if
the current screen is deleted), automatically give focus to the next
screen created. Saves the need to switch to a usable screen manually.
1999-03-23 15:56:56 +00:00
drochner 7cfac216d7 Don't initialize any virtual screens (except the system console) at
autoconfiguration time; this can be done better from rc.local.
(For INSTALL kernels, WSDISPLAY_DEFAULTSCREENS can be defined which
sets up that many screens with default parameters.)
1999-03-13 14:46:20 +00:00
sommerfe 999d27da77 Don't bother copying output queue into automatic buffer; instead, pass
contiguous chunk of outq to emulation routine.  Fix based on patch
from M. Drochner, modified to call output routine once with each
contiguous chunk when the ring buffer wraps around.
1999-02-08 14:48:07 +00:00