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
To complete this, some extra state has to be kept somewhere so that the
B38400 flag in Linux can be correctly translated to/from either 38400,
57600 or 115200.
Submitted by: Robert Sanders <rsanders@mindspring.com>
Compile and link a new kernel, that will give native ELF support, and
provide the hooks for other ELF interpreters as well.
To make native ELF binaries use John Polstras elf-kit-1.0.1..
For the time being also use his ld-elf.so.1 and put it in
/usr/libexec.
The Linux emulator has been enhanced to also run ELF binaries, it
is however in its very first incarnation.
Just get some Linux ELF libs (Slackware-3.0) and put them in the
prober place (/compat/linux/...).
I've ben able to run all the Slackware-3.0 binaries I've tried
so far.
(No it won't run quake yet :)
Also, LINUX_POSIX_VDISABLE is \0, FreeBSD's is 0xff. Convert between them.
This enables some more programs to run, including the Livingston Portmaster
utilities (PMtools).
Submitted by: Robert Sanders <rsanders@mindspring.com>
netscape-2.0 for Linux running all the Java stuff. The scrollbars are now
working, at least on my machine. (whew! :-)
I'm uncomfortable with the size of this commit, but it's too
inter-dependant to easily seperate out.
The main changes:
COMPAT_LINUX is *GONE*. Most of the code has been moved out of the i386
machine dependent section into the linux emulator itself. The int 0x80
syscall code was almost identical to the lcall 7,0 code and a minor tweak
allows them to both be used with the same C code. All kernels can now
just modload the lkm and it'll DTRT without having to rebuild the kernel
first. Like IBCS2, you can statically compile it in with "options LINUX".
A pile of new syscalls implemented, including getdents(), llseek(),
readv(), writev(), msync(), personality(). The Linux-ELF libraries want
to use some of these.
linux_select() now obeys Linux semantics, ie: returns the time remaining
of the timeout value rather than leaving it the original value.
Quite a few bugs removed, including incorrect arguments being used in
syscalls.. eg: mixups between passing the sigset as an int, vs passing
it as a pointer and doing a copyin(), missing return values, unhandled
cases, SIOC* ioctls, etc.
The build for the code has changed. i386/conf/files now knows how
to build linux_genassym and generate linux_assym.h on the fly.
Supporting changes elsewhere in the kernel:
The user-mode signal trampoline has moved from the U area to immediately
below the top of the stack (below PS_STRINGS). This allows the different
binary emulations to have their own signal trampoline code (which gets rid
of the hardwired syscall 103 (sigreturn on BSD, syslog on Linux)) and so
that the emulator can provide the exact "struct sigcontext *" argument to
the program's signal handlers.
The sigstack's "ss_flags" now uses SS_DISABLE and SS_ONSTACK flags, which
have the same values as the re-used SA_DISABLE and SA_ONSTACK which are
intended for sigaction only. This enables the support of a SA_RESETHAND
flag to sigaction to implement the gross SYSV and Linux SA_ONESHOT signal
semantics where the signal handler is reset when it's triggered.
makesyscalls.sh no longer appends the struct sysentvec on the end of the
generated init_sysent.c code. It's a lot saner to have it in a seperate
file rather than trying to update the structure inside the awk script. :-)
At exec time, the dozen bytes or so of signal trampoline code are copied
to the top of the user's stack, rather than obtaining the trampoline code
the old way by getting a clone of the parent's user area. This allows
Linux and native binaries to freely exec each other without getting
trampolines mixed up.
This first shot only incorporaties so much functionality that DOOM
can run (the X version), signal handling is VERY weak, so is many
other things. But it meets my milestone number one (you guessed it
- running DOOM).
Uses /compat/linux as prefix for loading shared libs, so it won't
conflict with our own libs.
Kernel must be compiled with "options COMPAT_LINUX" for this to work.
Display update method changed, now allways write in memory buffer,
then periodically update physical display.
Speed improvements (now > 5 times faster than the old syscons).
History now circular buffer, with changeable size.
History scroll by up/down line, up/down page, home and end.
Backtab proberly implemented.
Now space for 96 function keys, 63 allocated standard, default now
SCO/SYSV compat again as in the old days.
New keyboard definition files ~share/syscons/keymaps/*
Misc fixes for old "hacks" that broke SCO/SYSV compat.
More that I forgot before writing this...
No kernel config options anymore besides keyboard language layout.
Virtual consoles are now dynamically allocated, no NCONS anymore.
Software cursor blinking/nonblinking.
Visual bell for laptops (don't beep at meetings :-).
Cursor/bell default type setable via config "flags" instead of as defines.
Cursor/bell type setable via ioctl's.
New video modes 80x30 80x60 for some laptops, and those with multisync monitors.
Scroll-lock history (length currently fixed at 100 lines).
Lots of cleanups, some only commented out for now (will goaway soon).
Support for new features in vidcontrol/kbdcontrol.
Updated manpages.
320x200 256col VGA. This is nessesary for the iBCS stuff to work right.
(And we get the benefit of more video modes). Uses the videocard BIOS
to optain mode tables.
Added a "green" saver, switches off the syncs for "green" monitors.
Reviewed by:
Submitted by:
Obtained from:
Subject: syscons-1.3
Date: Sat, 29 Jan 94 23:33:50 MET
But here is the (hopefully) final syscons-1.3....
....
I've changed sgetc so it works as the pccons parallel
(it now uses a scgetc internally).
[
There were a couple changes that Bruce Evans sent me that were applied
to this version along with some changes that S'ren didn't incorporate
into the final version. There will be only minor changes if anything
from this version to his final release.
]