Commit Graph

203 Commits

Author SHA1 Message Date
macallan 3d2d786653 fixed tab width and formatting 2005-05-01 23:57:03 +00:00
macallan 7d5f292228 Made the Alt key act like STOP when options SPARCBOOK_CMD is #defined to
allow console switching with Alt-Fn because the SPARCbook 3 keyboard has no
STOP
2005-05-01 23:31:36 +00:00
martin 9aa40fe2c9 Add a missing #if to allow non-wscons compilation.
Noted by Juergen Hannken-Illjes.
2005-04-29 10:49:26 +00:00
martin eb7e634f97 Finish support for wskbd @ kbd @ zs/sab for sparc64 consoles.
Based on work from John Heasley and Michael Lorenz.
2005-04-28 15:03:48 +00:00
martin 7839bf7dd6 KNF 2005-03-14 11:50:17 +00:00
martin 585285c6fe Fix a conditional: sparc's will use the raster ops via RASTERCONSOL 2005-03-03 16:01:37 +00:00
martin b402d19851 Make it (at least) compile w/o wsdisplay @ cgsix.
Pointed out by Juergen Hannken-Illjes.
2005-03-03 12:11:49 +00:00
perry f31bd063e9 nuke trailing whitespace 2005-02-27 00:26:58 +00:00
martin 5e69671993 From Michael Lorenz: add screen switching keyboard symbols 2005-02-25 16:04:36 +00:00
martin eefe758c2d From Micahel Lorenz: wsdisplay support for cg6 2005-02-25 16:03:09 +00:00
heas a83cf36dd1 GC SUNKBDDISC & SUNMSDISC line discipline slot definitions. Both are already
entered by ttyldisc_add() calls such that ttyldisc_add chooses the slot anyway.
Double checked by Martin.
2005-02-21 22:43:07 +00:00
heas 242eaf2f4c oops, missed adding a return value for KBD_LAYOUT 2005-02-21 03:46:38 +00:00
heas 3242b332ff Place busy loops around the tsleep()s for keyboard ID and layout codes in
the attach routine.  In autoconf or "cold" state, tsleep does not wait for
a wakeup and my type 5 keyboard takes around 70ms to reset, so the keyboard
ID was being missed (read much later on) and key translation would be wrong.
Thanks Martin, Jochen, and Jason for help.
2005-02-21 03:37:39 +00:00
heas d1400b88f9 Return 0, not return -1, to the serial chip's input routine except when a
keyboard error is received.  For zs(4) and com(4), -1 causes the driver to
flush it's buffer.  This should eliminate missed keyboard codes, such as the
"key repeats forever until another key is hit" problem that happens because
the keyboard idle code gets flushed from the input buffer.
2005-02-20 22:17:28 +00:00
heas 0cb24ff9b9 Fix typo in a comment. 2005-02-20 20:32:45 +00:00
heas 48b3467d80 Add commented about keyboard IDs. No functional change. 2005-02-20 20:04:46 +00:00
perry 18db93c7f6 de-__P 2005-02-04 02:10:35 +00:00
bjh21 b1cd280714 Go back to filtering out KBD_IDLE events by default. The Xsun shipped with
NetBSD 2.0 gets confused by them (generating events for keycode 134 when
all keys are released), and even when that's fixed we should keep one release
worth of backward compatibility.
2004-12-31 14:18:35 +00:00
itojun aca4c091d3 sprintf -> snprintf 2004-04-22 00:17:10 +00:00
pk fb4c6462e1 fb_is_console/SUN4U: fbnode => prom_stdout_node. 2004-03-19 16:05:25 +00:00
pk ea53363e84 Rename PROM_getprop*() => prom_getprop*(). 2004-03-17 17:04:58 +00:00
pk c188a40b85 Update previous change: set defaults properly. 2004-03-17 14:00:46 +00:00
pk 9166dfe50b Use prom_getoption() and drop home-grown string-to-integer conversion code. 2004-03-16 22:47:10 +00:00
wiz d20841bb64 Uppercase CPU, plural is CPUs. 2004-02-13 11:36:08 +00:00
jdolecek d5bf86dcf4 Modify the licences of code written by Theo De Raadt from a 4-clause
to a 2-clause licence (retaining UCB clauses (1) and (2)), per PR
22409 from Joel Baker, approved by Theo de Raadt.
2003-12-10 16:35:20 +00:00
agc 7db1d33cba Modify the licences of code written by Theo De Raadt from a 4-clause
to a 2-clause licence (retaining UCB clauses (1) and (2)), per PR
22409 from Joel Baker, approved by Theo de Raadt, and ratified by
myself - the only discrepancy being the handling of the original
clause 3 in src/usr.sbin/yppoll/yppoll.c.
2003-12-10 12:06:25 +00:00
keihan 8476e6755a NetBSD.ORG -> NetBSD.org
Now all "NetBSD.ORG" are gone from src/sys.
2003-12-04 12:42:54 +00:00
bouyer 6fb817f5dd Commit changes proposed on tech-kern Thu, 6 Nov 2003
- factor out disksubr.c between sun3, sparc and sparc64. Keep the sun3
  groveling code to find a NetBSD disklabel in the first sector (so that it
  can find a label at the old sun3 LABELOFFSET) as a fallback is not
  label at LABELOFFSET, or sun label is present.
- Fix the sun3 LABELOFFSET (was 64, but the kernel wrote the NetBSD label at
  128)
- Make next68k disksubr.c always write a next-compatible disklabel.
- remove #ifdef __sparc__ hack from disklabel(8), and change it to issue
  a DIOCWDINFO after writing the disklabel to the raw partition in the
  -r/-I case (so that the kernel can convert the label if needed).
2003-11-15 17:52:30 +00:00
chs e07f0b9362 eliminate uvm_useracc() in favor of checking the return value of
copyin() or copyout().

uvm_useracc() tells us whether the mapping permissions allow access to
the desired part of an address space, and many callers assume that
this is the same as knowing whether an attempt to access that part of
the address space will succeed.  however, access to user space can
fail for reasons other than insufficient permission, most notably that
paging in any non-resident data can fail due to i/o errors.  most of
the callers of uvm_useracc() make the above incorrect assumption.  the
rest are all misguided optimizations, which optimize for the case
where an operation will fail.  we'd rather optimize for operations
succeeding, in which case we should just attempt the access and handle
failures due to insufficient permissions the same way we handle i/o
errors.  since there appear to be no good uses of uvm_useracc(), we'll
just remove it.
2003-11-13 03:09:28 +00:00
chs 395b58b692 keep the caller's defaults instead of supplying our own. 2003-10-28 16:25:29 +00:00
chs cd23cf5c7c uninitialized variables. 2003-10-28 15:25:27 +00:00
jdolecek 7cea8a1389 cleanup & uniform descriptor owner handling:
* introduce fsetown(), fgetown(), fownsignal() - this sets/retrieves/signals
  the owner of descriptor, according to appropriate sematics
  of TIOCSPGRP/FIOSETOWN/SIOCSPGRP/TIOCGPGRP/FIOGETOWN/SIOCGPGRP ioctl; use
  these routines instead of custom code where appropriate
* make every place handling TIOCSPGRP/TIOCGPGRP handle also FIOSETOWN/FIOGETOWN
  properly, and remove the translation of FIO[SG]OWN to TIOC[SG]PGRP
  in sys_ioctl() & sys_fcntl()
* also remove the socket-specific hack in sys_ioctl()/sys_fcntl() and
  pass the ioctls down to soo_ioctl() as any other ioctl

change discussed on tech-kern@
2003-09-21 19:16:48 +00:00
uwe 3a942f1015 cc_callout does not belong to struct cons_channel, as it's only used
by sparc for PROM console input channel.  Demote it to kd.c as a
static variable.

While there, use callout_schedule instead of callout_reset to
reschedule the PROM polling callout, and init prom_cons_channel
statically.
2003-08-27 01:37:38 +00:00
uwe bb09aff859 Undo previous as it broke things.
There are some scattered implicit RASTERCONSOLE dependencies,
so there should be a better way.
2003-08-25 17:50:22 +00:00
uwe 65aeb1d742 #include "opt_rcons.h" 2003-08-24 17:31:59 +00:00
agc aad01611e7 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22364, verified by myself.
2003-08-07 16:26:28 +00:00
lukem 365cbd9428 add missing __KERNEL_RCSID() 2003-07-14 15:47:00 +00:00
fvdl d5aece61d6 Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
2003-06-29 22:28:00 +00:00
martin 2edcbf6bb2 struct proc * -> struct lwp * 2003-06-29 10:37:45 +00:00
darrenr 28c230cff5 More changes for providing lwpid for ktrace (sparc GENERIC built) 2003-06-29 09:56:29 +00:00
petrov b6d4c1c66b wsmouse for ms@tty. 2003-05-30 23:34:06 +00:00
nakayama 54e4cb1a6c fix kernel build error, such a configs w/o kbd, ms.
(approved by martin)
2003-01-24 16:54:34 +00:00
thorpej b97e4c2136 Merge the nathanw_sa branch. 2003-01-19 16:50:16 +00:00
thorpej c62a74e6d5 Merge the nathanw_sa branch. 2003-01-18 10:32:11 +00:00
christos 514f7047e4 si_ -> sel_ 2002-11-26 18:49:40 +00:00
martin 6837231089 Allow attaching wskbd at kbd, idea from Valeriy Ushakov.
This allows us to use both the old sun keyboard events (/dev/kbd) as
new wscons events (/dev/wskbd*).

TODO: Not implemented for the kbd at zstty attachment.
Wskbd as console does not yet work.
2002-10-26 19:11:13 +00:00
martin a4c5b71389 Fix pasto. 2002-10-25 21:50:10 +00:00
martin 325d7cc0df Scan code/keymap table for sun keyboards and wscons.
From OpenBSD, written by Jason L. Wright.
2002-10-25 20:40:34 +00:00
jdolecek e0cc03a09b merge kqueue branch into -current
kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
2002-10-23 09:10:23 +00:00
uwe af2a75546d Clean-up kbd driver layers a bit more. Lift common code into the upper layer.
Add some wskbd TODO remarks (hi, martin).
2002-10-21 15:36:35 +00:00
uwe c33f6bd531 vuid_event.h is in dev/sun now. 2002-10-21 15:22:03 +00:00
uwe 191626f788 Refactor kbd and mouse drivers so that they can use different middle
layers.  Common middle layer shared by kbd_zs and sunkbd is moved into
the new file.  Move shared config directives to files.sun and adjust
ports' files.* accordingly.

Need this to support console/Xsun on Mr.Coffee JavaStation.

Tested on sparc, sparc64 (by martin) and sun3 (by jdc).
2002-10-03 16:13:24 +00:00
thorpej b75a007d9f Add trailing ; to CFATTACH_DECL. 2002-10-02 16:51:16 +00:00
thorpej f02c7869a0 Remove unused extern decl of cgsix_sbus_ca. 2002-10-01 01:37:56 +00:00
thorpej ab29a17b64 Use CFATTACH_DECL(). 2002-10-01 01:05:50 +00:00
thorpej bf97c13c6c Declare all cfattach structures const. 2002-09-27 20:41:46 +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
itojun 5e8477f10f correct integer overrun 2002-09-04 03:58:37 +00:00
itojun 8e7a88a3ff integer overflow. from silvio@qualys.com 2002-08-06 22:51:45 +00:00
pk bb42415ffa Check whether a console is attached before sending data upstream. 2002-05-13 09:42:12 +00:00
lukem e8bbb685d9 Replace <dev/sun/sun_boot.h> with <sys/bootinfo.h>, which is intended
to be more generic than ``bbinfo definitions for Sun-based systems''.
Other platforms can store bbinfo-style information here, and possibly
other platform-specific boot information that needs to be accessible
by foriegn platforms in tools such as /usr/sbin/installboot.
2002-05-06 05:27:53 +00:00
bjh21 b53b7e5cd5 Include <stdint.h> or <sys/stdint.h> to get the C99 fixed-width types, since
<sys/types.h> doesn't necessarily provide them.
2002-04-24 15:29:45 +00:00
lukem dcb3421026 Add <dev/sun/sun_boot.h>, which contains common boot block stuff for
Sun based systems.
2002-04-24 01:33:55 +00:00
pk 0c22ac1fa6 Add entries for Type5 keys T5_Insert, T5_Home, T5_End, T5_PgUp and T5_PgDn
as suggested by uwe@netbsd.org.
2002-04-12 14:27:29 +00:00
fredette 8fbc2e1699 Changed some preprocessor tests for SUN4 to test for !SUN4U
instead.  Now this file can be used by the sun2 port.
2002-03-22 00:14:37 +00:00
fredette 9b70a4cc11 Added Sun common kbd_reg.h, kbio.h, and vuid_event.h files. 2002-03-22 00:11:55 +00:00
pk 56d115aa57 `bus_type_t' is gone. 2002-03-11 16:01:57 +00:00
tsutsui bcba62925f Call malloc(9) with M_ZERO flag instead of bzero() after malloc(). 2002-01-14 13:32:44 +00:00
pk f696afd8ff Name changes: {KBD,MS}_BPS => {KBD,MS}_DEFAULT_BPS 2001-12-11 17:27:25 +00:00
pk 80c46be6c1 KBD_BPS => KBD_DEFAULT_BPS (sync with ms driver nomenclature). 2001-12-09 12:03:32 +00:00
pk 5962ca0a49 Allow SUN_MS_BPS to override the mouse baud rate at all times. (see PR14774). 2001-12-09 12:02:06 +00:00
fredette 73001afb44 When opening the mouse port, be sure to open it for 8 data bits.
The sun2 PROM can leave the port configured for 7.
2001-11-27 16:19:43 +00:00
lukem 7ba10b3532 add RCSIDs 2001-11-13 06:54:32 +00:00
uwe 9380edd8ad In fb_bell call kbd_docmd only #if NKBD > 0.
This allows kernels without kbd at zs to be linked.
(JavaStation-1 does not have zs, it uses pckbc instead)
2001-11-12 08:14:30 +00:00
pk fd12ba4f30 Don't force a fixed baud rate if the parent zs driver has already determined
the baud rate set by the PROM.
2001-09-28 14:34:49 +00:00
eeh 98ecb5b215 getprop* -> PROM_getprop* 2001-09-26 20:53:05 +00:00
eeh 766a9b8c9c Change bus_space_mmap() signature to the official one. 2001-09-24 23:49:31 +00:00
thorpej b28dc27296 Define the DECstation framebuffer types, from pmax/include/fbio.h.
XXX Yes, this is disgusting, but it's also pretty stupid to have
what amounts to essentially the same include file duplicated in
so many places.
2001-09-19 18:29:03 +00:00
jdolecek 74954dadf9 use unsigned variable types as appropriate 2001-08-05 18:07:51 +00:00
pk fda9cb9936 Avoid unused variables if RASTERCONS_FULLSCREEN is defined. (see PR#13231) 2001-06-24 15:47:45 +00:00
wiz 0a600be867 receive, not recieve 2001-06-12 15:17:10 +00:00
mrg 054673b07c #endif /* takes no argument */ 2001-06-08 12:51:17 +00:00
mrg 59024512bd LKM friendly: move ev_out32() to netbsd32 specific code; add an ev_out32 hook. 2001-06-07 17:52:52 +00:00
chs bcc2ce4f8c give sunkbd and sunms a "poll" routine. 2001-05-17 02:24:00 +00:00
jdolecek 745ab257dc Put back all header files defining ioctls 2001-04-11 19:07:36 +00:00
jdolecek 372e5956ef Only install headers which are actually used by our userland. This
saves about 2.2MB under /usr/include/dev/. Discussed on tech-kern@
recently.

I HOPE to get the list right. The headers I left in are ones
used for MI tools and those whose usage I discovered by grep over tree sources.
Feel free to put needed includes back in if you encounter anything which
should not be removed from lists.
2001-04-11 07:42:31 +00:00
tsutsui 6c3ff254ea Get rid of (unintentionally added) ^M. 2001-01-10 14:58:08 +00:00
tsutsui 234840a1ae Initialize the FBC mode register in cg6attach().
Values are taken from sunGX.[ch] in xsrc.

Now RASTERCONSOLE works properly on my SS1+ with old 2-slot sbus cg6.
2001-01-10 13:26:52 +00:00
eeh 0db43ad6ce Kill extra "attached" message. 2000-12-19 04:36:05 +00:00
eeh 71b0c155a0 Support for MI console magic framework. 2000-11-08 23:41:42 +00:00
chs 1c76b8d14d fix types in debug code. 2000-11-05 22:59:27 +00:00
eeh 9350b8913d Adapt to new line discipline scheme. 2000-11-01 23:57:14 +00:00
pk f5ba0a3942 fb_is_console(): we must match on the `fb' propery in a V0 PROMs root node
only after establishing that the PROM output device is a frame buffer device.
2000-10-31 21:54:35 +00:00
pk 0abaf0f210 Fix compilation errors: unused variable & missing function return values. 2000-10-10 23:33:52 +00:00
abs 64f1d1a42f Add missing cast of ms to (struct device *) in ms_deviopen and ms_deviclose 2000-09-27 10:31:42 +00:00
eeh c28a7b93c0 Support for Sun Keyboard/Mouse line disciplines. 2000-09-21 23:40:47 +00:00
eeh ac3f296768 Guts of the Sun Keyboard/Mouse line disciplines.
N.B. They don't recognize L1-A yet.
2000-09-21 22:25:08 +00:00
eeh 194bbc3c5d Don't bcopy() from luserland. 2000-08-26 20:08:22 +00:00
eeh a0f2ab32f7 Make 64-bit clean. 2000-08-26 16:02:06 +00:00
pk 12cd7ada9a Common framebuffer functions.
(currently includes a special cased fb_isconsole() for sun4u).
2000-08-23 13:41:15 +00:00