Submitted by: Randall Hopper <rhh@ct.picker.com>
The patch supports using the X10 Mouse Remote in both stand-alone and
pass-through configurations, so you can plug your mouse and remote into the
same serial port, use the mouse for X, and use the remote for other apps
like Fxtv. For instance, we can now control fxtv via the remote control
just like a TV : change channels, mute, increase volume, zoom video,
freeze frame 8)
The mouse events are channeled through the syscons/sysmouse I/F like
normal, and the remote buttons are "syphoned off" to a UNIX-domain stream
socket (defined as _PATH_MOUSEREMOTE in <machine/mouse.h>) for a
remote-aware app to grab and use.
For further info on the X10 Mouse Remote see:
http://www.x10.com/products/x10_mk19a.htm
Major changes to the generic device framework for FreeBSD/alpha:
* Eliminate bus_t and make it possible for all devices to have
attached children.
* Support dynamically extendable interfaces for drivers to replace
both the function pointers in driver_t and bus_ops_t (which has been
removed entirely. Two system defined interfaces have been defined,
'device' which is mandatory for all devices and 'bus' which is
recommended for all devices which support attached children.
* In addition, the alpha port defines two simple interfaces 'clock'
for attaching various real time clocks to the system and 'mcclock'
for the many different variations of mc146818 clocks which can be
attached to different alpha platforms. This eliminates two more
function pointer tables in favour of the generic method dispatch
system provided by the device framework.
Future device interfaces may include:
* cdev and bdev interfaces for devfs to use in replacement for specfs
and the fixed interfaces bdevsw and cdevsw.
* scsi interface to replace struct scsi_adapter (not sure how this
works in CAM but I imagine there is something similar there).
* various tailored interfaces for different bus types such as pci,
isa, pccard etc.
* Eliminate bus_t and make it possible for all devices to have
attached children.
* Support dynamically extendable interfaces for drivers to replace
both the function pointers in driver_t and bus_ops_t (which has been
removed entirely. Two system defined interfaces have been defined,
'device' which is mandatory for all devices and 'bus' which is
recommended for all devices which support attached children.
* In addition, the alpha port defines two simple interfaces 'clock'
for attaching various real time clocks to the system and 'mcclock'
for the many different variations of mc146818 clocks which can be
attached to different alpha platforms. This eliminates two more
function pointer tables in favour of the generic method dispatch
system provided by the device framework.
Future device interfaces may include:
* cdev and bdev interfaces for devfs to use in replacement for specfs
and the fixed interfaces bdevsw and cdevsw.
* scsi interface to replace struct scsi_adapter (not sure how this
works in CAM but I imagine there is something similar there).
* various tailored interfaces for different bus types such as pci,
isa, pccard etc.
work in progress and has never booted a real machine. Initial
development and testing was done using SimOS (see
http://simos.stanford.edu for details). On the SimOS simulator, this
port successfully reaches single-user mode and has been tested with
loads as high as one copy of /bin/ls :-).
Obtained from: partly from NetBSD/alpha
FreeBSD/alpha. The most significant item is to change the command
argument to ioctl functions from int to u_long. This change brings us
inline with various other BSD versions. Driver writers may like to
use (__FreeBSD_version == 300003) to detect this change.
The prototype FreeBSD/alpha machdep will follow in a couple of days
time.
Linux emulation. This make Allegro Common Lisp 4.3 work under
FreeBSD!
Submitted by: Fred Gilham <gilham@csl.sri.com>
Commented on by: bde, dg, msmith, tg
Hoping he got everything right: eivind
_KPOSIX_PRIORITY_SCHEDULING options to work. Changes:
Change all "posix4" to "p1003_1b". Misnamed files are left
as "posix4" until I'm told if I can simply delete them and add
new ones;
Add _POSIX_PRIORITY_SCHEDULING system calls for FreeBSD and Linux;
Add man pages for _POSIX_PRIORITY_SCHEDULING system calls;
Add options to LINT;
Minor fixes to P1003_1B code during testing.
Gee, I wish there was a better way to run makesyscalls.sh so that
a make world finds missing things like this. Running it manually
sucks.
Pointed out by: Peter Dufault
(and even run). These files don't necessarily make sense for a
FreeBSD/Alpha kernel build. That will come later and these files
will be changed accordingly.
so that it is possible for kdump and truss to include them both. Use
#defines from pcvt_ioctl.h in conflicting cases, since pcvt_ioctl.h
gives a hint about the bogus third arg to _IO(). Ifdef the common
typedefs. Export `struct key_t' from pcvt_ioctl.h so pcvt_ioctl.h is
bug for bug compatible with console.h (now both are broken in C++
mode).
Move sigjmp_buf and jmp_buf structure definitions to machine/setjmp.h
so that i386 can continue to use int as the basic register type and
alpha can use long. Bruce was concerned about possible differing
alignment. I've left the definition of _JBLEN in machine/setjmp.h
even though Bruce's example used the number directly. I don't know if
any other code relies on _JBLEN, so I left it to avoid potential
breakage.
referenced by the build of user-space libraries. These files were
obtained from NetBSD (with ansi.h being modified to reflect the FreeBSD
off_t and pid_t implementation).
With a keymap with accent key definitions loaded to syscons, you press
an accent key followed by a regular letter key to produce an accented
letter. Press an accent key followed by the space bar to get the
accent letter itself.
Code is based on the ideas and work by jmrueda@diatel.upm.es and
totii@est.is.
PR: i386/4016
console.h
- Defined structures and constants for accent (dead) keys.
syscons.c, kbdtables.h
- When an accent key is pressed, set the corresponding index to
`accents'. If the next key is the space key, produce the accent char
itself. Otherwise search the accent key map entry, indexed by
`accents', for a matching pair of a regular char and an accented char.
- Added ioctl functions to set and get the accent key map (PIO_DEADKEYMAP
and GIO_DEADKEYMAP).
Pointed out by: Eivind Eklund <eivind@FreeBSD.ORG>
NOPROTO LINUX { int getpgrp(void); }
66 NOPROTO LINUX { int setsid(void); }
67 STD LINUX { int linux_sigaction(int sig, \
struct linux_sigaction *nsa, \
struct linux_sigaction *osa); }
68 STD LINUX { int linux_siggetmask(void); }
69 STD LINUX { int linux_sigsetmask(linux_sigset_t mask); }
70 NOPROTO LINUX { int setreuid(int ruid, int euid); }
71 NOPROTO LINUX { int setregid(int rgid, int egid); }
72 STD LINUX { int linux_sigsuspend(int restart, \
linux_sigset_t oldmask, linux_sigset_t mask); }
73 STD LINUX { int linux_sigpending(linux_sigset_t *mask); }
74 NOPROTO LINUX { int osethostname(char *hostname, \
u_int len);}
75 NOPROTO LINUX { int osetrlimit(u_int which, \
struct ogetrlimit *rlp); }
76 NOPROTO LINUX { int ogetrlimit(u_int which, \
struct ogetrlimit *rlp); }
77 NOPROTO LINUX { int getrusage(int who, struct rusage *rusage); }
78 NOPROTO LINUX { int gettimeofday(struct timeval *tp, \
struct timezone *tzp); }
79 NOPROTO LINUX { int settimeofday(struct timeval *tp, \
struct timezone *tzp); }
80 NOPROTO LINUX { int getgroups(u_int gidsetsize, gid_t *gidset); }
81 NOPROTO LINUX { int setgroups(u_int gidsetsize, gid_t *gidset); }
82 STD LINUX { int linux_select(struct linux_select_argv *ptr); }
83 STD LINUX { int linux_symlink(char *path, char *to); }
84 NOPROTO LINUX { int ostat(char *path, struct ostat *up); }
85 STD LINUX { int linux_readlink(char *name, char *buf, \
int count); }
86 STD LINUX { int linux_uselib(char *library); }
87 NOPROTO LINUX { int swapon(char *name); }
88 NOPROTO LINUX { int reboot(int opt); }
89 STD LINUX { int linux_readdir(int fd, struct linux_dirent *dent, \
unsigned int count); }
90 STD LINUX { int linux_mmap(struct linux_mmap_argv *ptr); }
91 NOPROTO LINUX { int munmap(caddr_t addr, int len); }
92 STD LINUX { int linux_truncate(char *path, long length); }
93 NOPROTO LINUX { int oftruncate(int fd, long length); }
94 NOPROTO LINUX { int fchmod(int fd, int mode); }
95 NOPROTO LINUX { int fchown(int fd, int uid, int gid); }
96 NOPROTO LINUX { int getpriority(int which, int who); }
97 NOPROTO LINUX { int setpriority(int which, int who, int prio); }
98 NOPROTO LINUX { int profil(caddr_t samples, u_int size, \
u_int offset, u_int scale); }
99 STD LINUX { int linux_statfs(char *path, \
struct linux_statfs_buf *buf); }
100 STD LINUX { int linux_fstatfs(int fd, \
struct linux_statfs_buf *buf); }
101 STD LINUX { int linux_ioperm(unsigned int lo, \
unsigned int hi, int val); }
102 STD LINUX { int linux_socketcall(int what, void *args); }
103 STD LINUX { int linux_ksyslog(int what); }
104 STD LINUX { int linux_setitimer(u_int which, \
struct itimerval *itv, struct itimerval *oitv); }
105 STD LINUX { int linux_getitimer(u_int which, \
struct itimerval *itv); }
106 STD LINUX { int linux_newstat(char *path, \
struct linux_newstat *buf); }
107 STD LINUX { int linux_newlstat(char *path, \
struct linux_newstat *buf); }
108 STD LINUX { int linux_newfstat(int fd, struct linux_newstat *buf); }
109 STD LINUX { int linux_uname(struct linux_old_utsname *up); }
110 STD LINUX { int linux_iopl(int level); }
111 STD LINUX { int linux_vhangup(void); }
112 STD LINUX { int linux_idle(void); }
113 STD LINUX { int linux_vm86(void); }
114 STD LINUX { int linux_wait4(int pid, int *status, \
int options, struct rusage *rusage); }
115 STD LINUX { int linux_swapoff(void); }
116 STD LINUX { int linux_sysinfo(void); }
117 STD LINUX { int linux_ipc(int what, int arg1, int arg2, int arg3, \
caddr_t ptr); }
118 NOPROTO LINUX { int fsync(int fd); }
119 STD LINUX { int linux_sigreturn(struct linux_sigcontext *scp); }
access
These patches enables us to play quake2 .
Support linux keyboard ioctl for setting RAW, MEDIUMRAW and XLATE.
Support linux virtual terminal operations:
OPENQRY, GETMODE, SETMODE, GETSTATE, ACTIVATE, and WAITACTIVE.
Submitted by: Amancio Hasty <hasty@rah.star-gate.com>
MS IntelliMouse, Kensington Thinking Mouse, Genius NetScroll,
Genius NetMouse, Genius NetMouse Pro, ALPS GlidePoint, ASCII
MieMouse, Logitech MouseMan+, FirstMouse+
- The `psm' driver is made to recognize various models of PS/2 mice
and enable their extra features so that their additional buttons and
wheel/roller are recognized. The name of the detected model will be
printed at boot time.
- A set of new ioctl functions are added to the `psm', `mse' and
`sysmouse' drivers so that the userland program (such as the X server)
can query device information and change driver settings.
- The wheel/roller movement is handled as the `Z' axis movement by the
mouse drivers and the moused daemon. The Z axis movement may be mapped
to another axis movement or buttons.
- The mouse drivers support a new, standard mouse data format,
MOUSE_PROTO_SYSMOUSE format which can encode x, y, and x axis movement
and up to 10 buttons.
/sys/i386/include/mouse.h
- Added some fields to `mousestatus_t' to store Z axis movement
and flag bits.
- Added the field `model' to `mousehw_t' to store mouse model code.
Defined model codes.
- Extended `mousemode_t'.
- Added new protocols and some constants for them.
- Added new ioctl functions and structures.
- Removed obsolete ioctl definitions.
/sys/i386/include/console.h
- Added `dz' field to the structure `mouse_data' to pass Z axis movement
to `syscons/sysmouse'.
- Removed LEFT_BUTTON, MIDDLE_BUTTON and RIGHT_BUTTON. Use button bits
defined in `mouse.h' instead.
/sys/i386/isa/psm.c
- Added a set of functions to detect various mice which have additional
features (wheel and buttons) unavailable in the standard PS/2 mouse.
- Refined existing ioctl functions and added new ones. Most important
of all is MOUSE_SETLEVEL which manipulates the output level of the driver.
While the output level remains zero, the output from the `psm' driver is
in the standard PS/2 mouse format (three bytes long). When the level
is set to one, the `psm' driver will send data in the extended format.
At the level two the driver uses the format which is native to the
connected mouse is used. (Meaning that the output from the device is
passed to the caller as is, unmodified.) The `psm' driver will pass
such extended data format as is to the caller if the output level is
two, but emulates the standard format if the output level is zero.
- Added kernel configuration flags to set initial resolution
(PSM_CONFIG_RESOLUTION) and acceleration (PSM_CONFIG_ACCEL).
- Removed the compile options PSM_ACCEL, PSM_CHECKSYNC and PSM_EMULATION.
Acceleration ratio is now specified by the kernel configuration flags
stated above. Sync check logic is refined and now standard.
The sync check can be turned off by the new kernel configuration flags
PSM_CONFIG_NOCHECKSYNC (0x100). PSM_EMULATION has been of little use.
- Summer clean up :-) Removed unused code and obsolete comments.
/sys/i386/isa/mse.c
- Created mseioctl() to deal with ioctl functions MOUSE_XXXX.
Most importantly, the MOUSE_SETLEVEL ioctl will change the
output format from the 5 byte format to the new, extended format
so that the caller can take advantage of Z axis movement and additional
buttons.
- Use constants defined in `mouse.h' rather than magic numbers.
/sys/i386/isa/syscons.c
- Changed scioctl() to reflect the new `console.h' and some of the new
ioctls defined in `mouse.h'. Most importantly, the MOUSE_SETLEVEL
ioctl will change the `sysmouse' output format from the MouseSystems
5 byte format to the new, extended format so that the caller can
take advantage of Z axis movement and additional buttons.
- Added support for double/triple click actions of the left button and
single click action of the right button in the virtual console. The
left button double click will select a word under the mouse pointer.
The triple click will select a line and the single click of the right
button will extend the selected region to the current position of
the mouse pointer. This will make the cut/paste support more compatible
with xterm.
/sys/i386/isa/kbdio.h
- Added PSM_INTELLI_ID.
LINUX_SNDCTL_DSP_GETOPTR
LINUX_SNDCTL_DSP_GETIPTR
LINUX_SNDCTL_DSP_SETTRIGGER
LINUX_SNDCTL_DSP_GETCAPS
With this rev level the linux realaudio player 5 and xquake should work.
it in struct proc instead.
This fixes a boatload of compiler warning, and removes a lot of cruft
from the sources.
I have not removed the /*ARGSUSED*/, they will require some looking at.
libkvm, ps and other userland struct proc frobbing programs will need
recompiled.
much like the scancode mode.
However the keys that (for no good reason) returns extension codes
etc, are translated into singlebyte codes.
Needed by libvgl. This makes life ALOT easier, also the XFree86
folks could use this.
Add support for MODEX 320x240x256color with "unchained" adressing, giving
access to all 256K on all VGA's, those with that much memory that is :)
Also make sysmouse use the right resolution in graphics modes.
license managers to obtain the host's ethernet address as
a key.
Note that this implementation takes the first hardware address for
the first ethernet interface found, and disregards the interface name
that may be passed in, as linux ethernet devices are all "ethX".
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.
Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.
list of IP setsockopts the Linux emulator recognizes.
Explicitly disallow IP_HDRINCL since Linux's handling of
raw output is different than BSD's.
Closes PR#kern/2111.
Submitted by: y-nakaga@ccs.mt.nec.co.jp (Yoshihisa NAKAGAWA)
1. All the suggestions earlier made by Bruce: renaming some symbols,
stricter error checking, removing redundant code, etc.
2. The `psm' driver preserves the default counter resolution and
report rate, whatever they are after reset. (Based on reports and
suggestion from Nate and Rob Bolin).
3. The `psm' driver now does not check the so-called sync. bit in the
first byte of the data packet by default, so that the tapping feature
of ALPUS GlidePoint works (based on reports from Louis Mamakos). I
tested the code with ALPUS Desktop GlidePoint (M/N GP101) and found
no problem; tapping worked. It appears ALPUS produces several models
of GlidePoint. I hope the other models are OK too.
The check code can still be activated by defining the PSM_CHECKSYNC
option in the config file. (The bit checking slightly reduces, if not
completely eliminates, weird mouse behavior cased by unsynchronized
mouse data packets. It also helps us to detect if the mouse interrupt
can ever be lost. But, well, if there are devices which cannot be
supported this way...)
4. The `psm' driver does not include the protocol emulation code by
default. The code can still be compiled in if the PSM_EMULATION option
is specified in the config file. Louis Mamakos suggests the emulation
code is putting too much in the kernel, and `moused' works well.
I will think about this later and decide if the entire emulation
code should be removed.
5. And, of course, the fix in `scprobe()' from Bruce to cure the
UserConfig problem. My code in `kbdio.c' is slightly different from
his patch, but has the same effect. There still is a possibility that
`scprobe()' gets confused, if, for whatever reasons, the user holds
down a key for very long time during the boot process. But we cannot
cope with everything, can we?
Submitted by: Kazutaka YOKOTA (yokota@zodiac.mech.utsunomiya-u.ac.jp)
syscons and psm, curtesy Kazutaka Yokota with minor changes by
me. This contains an update of the psm driver as well.
This also fixes the breakage that I introduced to the psm driver by
making syscons poll for keyboard events in the atempt to fix the
hanging keyboard problem.
It works perfectly for me, and I'd like to hear from all that
have had keyboard/ps/2 mouse problems if this is the cure...
Submitted by: Kazutaka YOKOTA (yokota@zodiac.mech.utsunomiya-u.ac.jp)
the one place that depended on it. wakeup() is now prototyped in
<sys/systm.h> so that it is normally visible.
Added nested include of <sys/queue.h> in <vm/vm_object.h>. The queue
macros are a more fundamental prerequisite for <vm/vm_object.h> than
the wakeup prototype and previously happened to be included by
namespace pollution from <sys/proc.h> or elsewhere.
- don't include <sys/ioctl.h> in any header. Include <sys/ioccom.h>
instead. This was already done in 4.4Lite for the most important
ioctl headers. Header spam currently increases kernel build
times by 10-20%. There are more than 30000 #includes (not counting
duplicates) for compiling LINT.
- include <sys/types.h> if and only it is necessary to make the header
almost self-sufficient (some ioctl headers still need structs from
elsewhere).
- uniformized idempotency ifdefs. Copied the style in the 4.4Lite
ioctl headers.
via an ioctl (MOUSE_ACTION).
Fixed a couple of bugs (destructive cursor, uncut, jitter).
Now applications can use the mouse via the MOUSE_MODE ioctl, its
possible to have a signal sent on mouseevents, makeing an event loop
in the application take over mouseevents.
Real support for a Textmode mousecursor, works by reprogramming the
charset. Together with this support for cut&paste in text mode.
To use it a userland daemon is needed (moused), which provides
the interface to the various mice protokols.
Bug fixes here and there, all known PR's closed by this update.
All new code is "#ifdef PC98"ed so this should make no difference to
PC/AT (and its clones) users.
Ok'd by: core
Submitted by: FreeBSD(98) development team