Commit Graph

4659 Commits

Author SHA1 Message Date
David E. O'Brien 9bc192de1d Explain that MAXMEM maynot be nessicary for detection of >64MB RAM. 1997-12-31 21:46:17 +00:00
Poul-Henning Kamp cf26fc706f Fix a race condition I introduced.
Reviewed by: bde (with only minor complaints :-)
1997-12-30 20:11:01 +00:00
Poul-Henning Kamp 681299a26e Fix a include gottcha in the SMP case.
Submitted by: Simon Shapiro <Shimon@Simon-Shapiro.ORG>
1997-12-29 23:36:56 +00:00
Steve Price 2487b1e072 Add back a #include <sys/types.h> so that this header is
self-sufficient again.  This is a quick fix that should
really be remedied by removing all of the gratuitous changes
made in revision 1.20.

PR:		5351
1997-12-28 22:31:59 +00:00
Poul-Henning Kamp 0f12aa9ffd More cleanup relating to our use of the TSC.
Look in the cpu_feature (CPUID output) to see if we have it.
1997-12-28 17:33:10 +00:00
Poul-Henning Kamp d46e059f94 wash, sort and put in order various nits from the i586_ctr -> tsc
commit.

Pointed out by: bde
1997-12-28 13:36:09 +00:00
Bruce Evans 88754aaf0e Fixed initialization of the divisor latch. We depended on siocnopen()
initializing it for the (usual) (siocniobase != 0) case, but
siocnopen() doesn't initialize it if the latch registers already
have the correct values.
1997-12-28 06:36:35 +00:00
Bruce Evans abee4d9808 YAMFsio.c (always call ttwwakeup() before returning from comstart()). 1997-12-28 06:23:03 +00:00
Bruce Evans e932603093 Always call ttwwakeup() before returning from comstart(). It isn't
necessary to call it when the tty layer's output state has not been
changed, but siostop() sometimes changes the TS_BUSY state and then
calls comstart() mainly for its side effect of calling ttwwakeup().
1997-12-28 06:20:47 +00:00
Bruce Evans ab9bca19b8 Removed unnecessary (and broken) wakeup code in rpstart(). There is no
need to do it directly, since ttwwakeup() is always called just before
returning from rpstart().  The brokenness was waking up the wrong address
after clearing TS_SO_OLOWAT.  It's not clear how processes waiting for
output to drain below low water ever got woken up.

Found by:	when I fixed longstanding warts in output watermark
		handling, this was the only driver that knew too much
		(anything) about the watermarks
1997-12-28 05:45:07 +00:00
Bruce Evans a4c0a67553 Removed stale comment about printf's deficiencies and rewrote the code
that worked around them for the CLI devtab listing.

Print the `conflicts' flag in the CLI devtab listing.
1997-12-28 05:20:59 +00:00
Jordan K. Hubbard 0031f3a90b Update comment to match updated sb0 line (conflicts keyword no longer needed
at IRQ 5).
1997-12-28 00:28:46 +00:00
Peter Wemm 388610239f Back out previous commit, the so-called "unused code" was most definately
used, and caused a reference to an uninitialised variable (state).
I think I've fixed it now, but since nothing in the tree seems to use it,
I'm not sure.
1997-12-27 03:00:59 +00:00
Bruce Evans 675ea6f083 Unspammed nested include of <vm/vm_zone.h>. 1997-12-27 02:56:39 +00:00
Peter Wemm 19d768b80b #include "opt_user_ldt.h" so that the #ifdef USER_LDT checks can work, as
commented about at length in the PR audit trail.

PR: 2412
1997-12-27 02:28:28 +00:00
Jordan K. Hubbard 43b651a5e7 Change major number to match the one actually used (whoops!).
Submitted by:	Steve Gericke <steveg@comtrol.com>
1997-12-26 23:11:13 +00:00
Poul-Henning Kamp 71f461f86a Rename "i586_ctr" to "tsc" (both upper and lower case instances).
Fix a couple of printfs too.

Warning: This changes the names of a couple of kernel options!
1997-12-26 20:42:37 +00:00
Poul-Henning Kamp cb0a3a9533 ename "i586_ctr" to "tsc" (both upper and lower case instances).
Fix a couple of printfs too.

Warning: This changes the names of a couple of kernel options!
1997-12-26 20:41:08 +00:00
Poul-Henning Kamp 0b0e40da7a Reorder to a more conventional if/then/else/endif structure. 1997-12-26 20:15:03 +00:00
Nate Williams e1d6dc656d This patch causes the "calltodo" timer list to be decremented by the amount
of time that the laptop was suspending.  Thus, select() calls that might have
suspended rather than firing  at 1hr + "time suspended" since the timer was
posted.

Adding:

    options  APM_FIXUP_CALLTODO

to the kernel config enables the patch.

[
This patch was slightly modified to use a consistant indent style and
I removed some unused local variables.  After this has been tested a
few weeks we'll make the options the default, so for now I'm now
documenting it in LINT.  Mike can later if he wants.
]

Reviewed by:	Mike Smith <msmith@freebsd.org>
Submitted by:	Ken Key  <key@cs.utk.edu>
1997-12-23 16:32:35 +00:00
Kazutaka YOKOTA 3e176bdf69 Document `flags' for the psm driver. 1997-12-23 08:01:16 +00:00
John Dyson 841fc3681b Correct my previous fix for the UPAGES problem. 1997-12-22 10:06:09 +00:00
John Dyson adbf9b6f86 Hopefully fix the problem with the TLB not being updated correctly.
Problem tracked down by bde@freebsd.org, but this is an attempted
efficient fix.
1997-12-22 00:36:48 +00:00
Stefan Eßer 8277ac255e Make the class code checks in function pci_cfgcheck less strict.
It failed to recognize the PCI bus in a system that had only an
old chip-set (class code 000000) and a Cyclom multiport serial
card on PCI bus 0, but no VGA card or disk or network controller.

PR:		i386/5300
Submitted by:	Nickolay N. Dudorov <nnd@itfs.nsk.su>
1997-12-20 09:04:25 +00:00
Bruce Evans 8cd077a7fd Augment $PATH to ensure searching of /sbin and /usr/sbin for sysctl
instead of using an absolute path to sysctl.
Problem reported by: ache
1997-12-18 21:03:04 +00:00
Peter Wemm 9b73941153 Add missing references to Xcpuast, get_isrlock and checkstate_probed_cpus 1997-12-18 02:09:29 +00:00
KATO Takenori 76ef01374e Regenerate (fix argument of linux_nice). 1997-12-17 03:16:11 +00:00
KATO Takenori c7da3245da I should not edit linux_prot.h directly. Fix the argument of linux_nice.
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
1997-12-17 03:12:35 +00:00
Eivind Eklund 8438b90fd3 Make hidden COMPAT_43 dependencies explict. Options in headers is a
pain in the backside.
1997-12-16 18:49:23 +00:00
Eivind Eklund 5591b823d1 Make COMPAT_43 and COMPAT_SUNOS new-style options. 1997-12-16 17:40:42 +00:00
Eivind Eklund 430df5f4b7 Throw options IPX, IPXIP and IPTUNNEL into opt_ipx.h.
The #ifdef IPXIP in netipx/ipx_if.h is OK (used from ipx_usrreq.c and
ifconfig.c only).

I also fixed a typo IPXTUNNEL -> IPTUNNEL (and #ifdef'ed out the code
inside, as it never could have compiled - doh.)
1997-12-15 20:31:25 +00:00
Mike Smith 7ebfc603cf As described by the submitter:
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>
1997-12-15 06:09:11 +00:00
Tor Egge 5c623cb649 Add support for low resolution SMP kernel profiling.
- A nonprofiling version of s_lock (called s_lock_np) is used
    by mcount.

  - When profiling is active, more registers are clobbered in
    seemingly simple assembly routines. This means that some
    callers needed to save/restore extra registers.

  - The stack pointer must have space for a 'fake' return address
    in idle, to avoid stack underflow.
1997-12-15 02:18:35 +00:00
Tor Egge 549a42942d Don't forward hardclock or statclock to stopped cpus. Disable forwarding
when a panic has occured.
1997-12-15 01:14:10 +00:00
Mike Smith f2477ae13d As described by the submitter:
- emulate Linux IP_HDRINCL behaviour in sendto(): byte order fixed
	  Note that we do an extra getsockopt() on every sendto()
	  to check if the option is set because we don't keep state
	  in the emulator code. Is there a better way to implement
	  this?
	- correct a bug (value of "name" not passed) with
	  getsockopt()

Submitted by:	pb@fasterix.freenix.org (Pierre Beyssac)
1997-12-14 03:17:54 +00:00
John Dyson 8256655132 After one of my analysis passes to evaluate methods for SMP TLB mgmt, I
noticed some major enhancements available for UP situations.  The number
of UP TLB flushes is decreased much more than significantly with these
changes.  Since a TLB flush appears to cost minimally approx 80 cycles,
this is a "nice" enhancement, equiv to eliminating between 40 and 160
instructions per TLB flush.

Changes include making sure that kernel threads all use the same PTD,
and eliminate unneeded PTD switches at context switch time.
1997-12-14 02:11:23 +00:00
Tor Egge 80db913bd6 Add needed #include.
Problem found by: Bruce Evans <bde@zeta.org.au>
1997-12-12 21:45:23 +00:00
Peter Wemm 5eaf45f67b I've been using these tweaks to enable the sound driver to talk to the
(mutant) Crystal CSS4236 chip on the Intel PR440FX SMP motherboard.

XXX this uses some rather ugly PnP bootstrap code that is *NOT* compatable
with 'controller pnp0' or *ANY* other PnP devices.  If you use some other
PnP devices, enabling css0 will burn your house down. :-]  The
"simplified" PnP init sequence directly blats your config(8) settings onto
the chip.  I'm pretty sure 'css0' will conflict with 'mss0', this whole
area desperately needs a cleanup.

I have been using the following with some success on the PR440FX:
controller   snd0
device css0  at isa? port 0x534 irq 5 drq 1 flags 0x08 vector adintr
device opl0  at isa? port 0x388
device mpu0  at isa? port 0x330 irq 10 vector mpuintr
1997-12-12 14:08:50 +00:00
Jamil J. Weatherbee 6aa5dc4099 eliminated a previously unnoticde compile warning about use of
__inline, not good to use anyway ?!?!!
1997-12-09 12:41:13 +00:00
Jamil J. Weatherbee 4fdababa9f the alog.c file respectively, added in wrong order by accident 1997-12-09 12:07:50 +00:00
Jamil J. Weatherbee a1e9e3087e add entry in LINT for alog driver
added line to files.i386 to compile in alog.c optionally as a driver
1997-12-09 12:04:49 +00:00
Kazutaka YOKOTA b8e63afa1c Remove obsolete psm driver options: PSM_ACCEL, PSM_EMULATION,
PSM_CHECKSYNC.
1997-12-09 11:56:19 +00:00
Jamil J. Weatherbee dd2cb0618e Added major 86 for the alog driver. 1997-12-09 10:51:11 +00:00
Steve Passe eae8fc2c8a The improvements to clock statistics by Tor Egge
Wrappered and enabled by the define BETTER_CLOCK (on by default in smpyests.h)

Reviewed by:	smp@csn.net
Submitted by:	Tor Egge <Tor.Egge@idi.ntnu.no>
1997-12-08 23:00:24 +00:00
Steve Passe baf41202ca The improvements to clock statistics by Tor Egge
Wrappered and enabled by the define BETTER_CLOCK (on by default in smpyests.h)

apic_vector.s also contains a small change I (smp) made to eliminate
the double level INT problem.  It seems stable, but I haven't the tools
in place to prove it fixes the problem.

Reviewed by:	smp@csn.net
Submitted by:	Tor Egge <Tor.Egge@idi.ntnu.no>
1997-12-08 22:59:39 +00:00
Steve Passe a39e666dbc Removed the annoying "apic_ipi might be stuck" message.
Added commentary about the real problem and what needs to be done.
1997-12-08 18:36:02 +00:00
Kazutaka YOKOTA c6d1bed112 - Add support for the following mice to psm/moused/sysmouse:
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.
1997-12-07 08:09:19 +00:00
Kazutaka YOKOTA 821ecb1944 Removed obsolete options: PSM_CHECKSYNC, PSM_ACCEL and PSM_EMULATION. 1997-12-07 08:07:17 +00:00
Bruce Evans df1c78063c Use ENOIOCTL instead of -1 (= ERESTART) for diskslice ioctls that are
not handled at a particular level.
1997-12-06 14:27:56 +00:00
Bruce Evans 239b7b699e Use ENOIOCTL instead of -1 (= ERESTART) for tty ioctls that are
not handled at a particular level.  This fixes mainly restarting
of interrupted TIOCDRAINs and TIOCSETA{W,F}s.
1997-12-06 13:25:01 +00:00
Andrey A. Chernov 90a5affc0a Add AWE32 description to visualconfig 1997-12-06 08:20:00 +00:00
Andrey A. Chernov a76d828674 Attach messages: remove unneded newlines and add
missing conf_printf
1997-12-06 07:48:22 +00:00
Sean Eric Fagan 2a024a2b05 Changes to allow event-based process monitoring and control. 1997-12-06 04:11:14 +00:00
Bruce Evans 1cd52ec333 Don't include <sys/lock.h> in headers when only `struct simplelock' is
required.  Fixed everything that depended on the pollution.
1997-12-05 19:55:52 +00:00
Joerg Wunsch 3bb99eb225 Finally, implement a mini-parser for RockRidge alternative filenames,
so the filenames can be displayed and selected in full beauty.  If RR
is present, the match is now case-sensitive, if RR is missing, the
match is case-insensitive (as it used to be before).
1997-12-04 21:52:47 +00:00
John-Mark Gurney 4d9deedb49 document and make the NO_F00F_HACK a proper option...
also, sort some option includes while I'm here..

Forgotten by:	sef
1997-12-04 21:21:26 +00:00
John-Mark Gurney b0050656a7 document and make the NO_F00F_HACK a proper option...
Forgotten by:	sef
1997-12-04 21:20:58 +00:00
Jordan K. Hubbard e41b6f2db7 After consultation with David, change
#ifndef NO_F00F_HACK
to
#if defined(I586_CPU) && !defined(NO_F00F_HACK)
1997-12-04 14:35:40 +00:00
KATO Takenori 4ec099d2b3 Use the argmument `port' instead of hard coded address in atapi_probe.
Submitted by:	kura@melchior.q.t.u-tokyo.ac.jp (Tomohiko Kurahashi)
1997-12-04 13:15:16 +00:00
Warner Losh 861570bb45 The Libretto's BIOS doesn't set edx on the APM_GETPWSTATUS call, so
the barrery time remaining is reported as a random number.  Initialize
edx to 0xffff in this case, and to 0 in all other cases.  This change
should be benign on other machines.
Reviewed by:	jdp
1997-12-04 02:40:00 +00:00
Sean Eric Fagan 34883582bc Make has_f00f_bug extern, and get rid of some unused code in the f00f
code.

Submitted by:	Mikael Karpberg & Cy Schubert
1997-12-03 16:27:33 +00:00
Sean Eric Fagan c4fbf2774d Work around for the Intel Pentium F00F bug; this is Intel's recommended
workaround.  Note that this currently eats up two pages extra in the system;
this could be alleviated by aligning idt correctly, and then only dealing with
that (as opposed to the current method of allocated two pages and copying the
IDT table to that, and then setting that to be the IDT table).
1997-12-03 02:45:50 +00:00
Joerg Wunsch 660ee160b9 Fix a bug that caused cdboot to stop reading the root directory at the
end of the first block.

Problem found by:	Kenneth Merry <ken@plutotech.com>
1997-12-02 21:13:59 +00:00
Poul-Henning Kamp ab3f746966 In all such uses of struct buf: 's/b_un.b_addr/b_data/g' 1997-12-02 21:07:20 +00:00
Amancio Hasty 9e41c7c31e Include sound_timer.c for mss device and added
sound_timer.c, opl3.c, ad1848.c, adlib_card.c to trix device.
trix is a driver for an AudioTrix Pro.
1997-12-01 09:29:50 +00:00
John-Mark Gurney 857c08d17c fix a few style nites...
make isa_dmacascade, isa_dmastart, isa_dmadone, and find_isadev MUCH
easier to be found by starting them at the beginging of the line...

remove braces inside of ifdef RESOURCE_CHECK... found by % in vi...
1997-11-30 09:44:28 +00:00
KATO Takenori ead6305baa Recognize 3C569 network interface when `PC98' is defined.
Submitted by:	HAMADA Naoki <hamada@astec.co.jp>
1997-11-27 12:59:46 +00:00
Joerg Wunsch 81df9bbcd5 Removed an unused line of code, that caused an ``maybe used uninitialized''
warning.

Found by:	Simon Shapiro
1997-11-26 22:45:47 +00:00
Mark Murray 61ca849927 From the author:
Here are the remanding changes required to support the Ensoniq
Soundscape using FreeBSD 3.0-current.

Notes:

  1) ad1848_init already has code to detect if DMA_DUPLEX should
     be set so it is not necessary (and is in fact a mistake) to
     hard code setting it.  Not all soundcards (i.e. the current
     sscape driver) are capable of using DMA_DUPLEX.

  2) The other changes are hopefully self explanatory.  Feel free
     to let me know if you need additional information.

Submitted by:	john@feith.com (John Wehle)
1997-11-25 19:30:38 +00:00
Søren Schmidt 0690c6fe58 Move the hardware currsor off screen when getting back from an
unknown mode.
Fix warning on uninitialized var.
1997-11-25 12:44:44 +00:00
Bruce Evans 17788a0aef Fixed multiple definitions of boothowto. 1997-11-24 18:35:11 +00:00
Bruce Evans 043e37feab Added a sysctl (machdep.cputime_clock) to select the clock used by
"high resolution" profiling.  The available clocks are:
- the i8254 clock
- on non-SMP i586's and i686's: the TSC
- on systems with I586_PMC_GUPROF configured, and PERFMON configured
  and available: all the performance counters.
This is unfinshed (there are problems with locking out the PERFMON
device driver, and with losing calibration after switching the clock),
but better than static configuration or writing to kmem.

Changed ifdefs to avoid generating code for non-working option
combinations.
1997-11-24 18:16:23 +00:00
Bruce Evans 21e5241572 Fixed some #include messes.
Hid the check of the user %cs in syscall() under `#ifdef DIAGNOSTIC'.
1997-11-24 13:25:37 +00:00
Amancio Hasty b237a8422d Fixed poll related problem which was exhibited by running
amp (audio mpeg player) and with cards such as SB.
1997-11-24 07:31:20 +00:00
Amancio Hasty 6eca7bce6c Fixed an acquired dma problem with respect to sb cards only. 1997-11-23 22:49:50 +00:00
Amancio Hasty f8f6afaf7c minor code clean up to sb_dsp.c and fix compile error with uart6850.c 1997-11-23 20:31:20 +00:00
Amancio Hasty 0a8fa5851f Missing part of my last sb_dsp.c sb16_dsp.c commit. 1997-11-23 19:05:01 +00:00
Amancio Hasty 26ed678ef9 Fixed acquired dma channel problem. 1997-11-23 07:35:06 +00:00
John-Mark Gurney 60dc9be97b update of Luigi's sound drivers...
this updates to 971117 plus a small sb change that was after that release..
1997-11-23 07:03:21 +00:00
Jonathan Lemon b20f1ceeee Correct CPU_CYRIX_NO_LOCK fix.
PR:		5121
Pointed out by:	Matthew Hunt
1997-11-21 22:33:52 +00:00
Bruce Evans b361bff536 Fixed setting of `safepri'. It should be SWI_AST_MASK most of the
time, but was left at 0.  This caused the "can't happen" case in
splz_swi to happen for panics when tsleep() calls splx(safepri)
and there is a SWI_AST pending.  This was harmless because the
the error handling happens to be right.  Debugging this was tricky
because debugger traps force SWI_AST_MASK on in `cpl'.
1997-11-21 18:27:15 +00:00
Bruce Evans cc8ae84672 Moved splhigh()/spl0() calls from isa_configure() to configure() so that
there is a natural place to initialize `safepri' in a future commit.
Spinoffs:
- spl0() gets called in the unlikely event that isa is not configured.
- configure() has better control over enabling interrupts.
- it is now less unclear that interrupts aren't actually enabled early.
  Rev.1.48 of autoconf.c seems to have done the opposite of what was
  intended - moving the isa_configure() call delayed the spl0() side
  effect.
Added some comments about the bogons.  Removed the splhigh() call since
it is a no-op.
1997-11-21 18:14:02 +00:00
Kazutaka YOKOTA 10974dbd20 Make comp_vgaregs() less strict about VGA register values when
checking the BIOS video mode paramter table.  Now syscons uses the
parameter table even if some bits in the table are different from the
current VGA register settings.

Even if comp_vgaregs() finds that the BIOS video parameter table looks
totally unfamiliar to it, syscons allows the user to change the
current video mode to some modes which are based on the VGA 80x25
mode. They are VGA 80x30, VGA 80x50, VGA 80x60. In this case the user
will be warned, during boot, that video mode switching is only
paritally supported on his machine.

PR: bin/4477
1997-11-21 11:37:07 +00:00
Kazutaka YOKOTA 358e851a59 Fix for a PS/2 mouse model from MouseSystems. It now appears that
this mouse can correctly operate only in the high resolution mode.

If the mouse pointer jumps to the top or left edge or the top-left
corner of the screen, try defining PSM_MSCKLUDGE in the kernel
configuration file. This option will put the mouse in the high
resolution mode during device initialization.
1997-11-21 11:36:21 +00:00
Peter Wemm 617d73c29d Previous commit refers to SWAP_PART, which is only defined if the include
file that it's in is #included...
1997-11-21 05:44:07 +00:00
Bruce Evans d447dbee36 Removed a duplicate (sloppy common-style) definition.
Fixed some style bugs.
1997-11-20 19:41:20 +00:00
Bruce Evans 96a73b4063 Moved some extern declarations to header files (unused ones to /dev/null). 1997-11-20 19:30:35 +00:00
Bruce Evans b7a2b1ff66 Avoid passing some more `retval's. 1997-11-20 18:43:55 +00:00
Bruce Evans eb0fb17ea5 Fixed wrong limits for the kernel text in db_numargs(). The
interval [VM_MIN_KERNEL_ADDRESS, etext] was used instead of
[btext, etext).  Added a comment about this being completely
wrong for LKMs.  This only affects interpreting the instructions
after the return to attempt decide the number of args.  The
attempt usually fails anyway.
1997-11-20 18:24:52 +00:00
Bruce Evans af2f22807f Fixed write enabling of the kernel text section. The overlap
checking was mostly wrong at the boundaries.  For the lower limit,
VM_MIN_KERNEL_ADDRESS was used instead of btext and there was an
off-by-(`size' - 1) error.  For the upper limit, &etext was used
instead of etext and there was an off-by-1 error.  The bugs were
harmless because `size' is not too large and some memory is mapped
just beyond the ends.  We still depend on the former to avoid
having to handle the case where the memory range covers the whole
text section, and on the latter to prevent problems when we map
just beyond an end to allow writing an address range that overlaps
the end.

Fixed placement of a nearby comment.
1997-11-20 18:09:36 +00:00
Bruce Evans e6af3c69e8 Don't allow setting the dump device to any partition except the
one traditionally reserved for swap devices.  The restrictions
should now be the same as the ones for dumpsys().  The restriction
on the partition should be removed someday, and dumpsys() shouldn't
repeat all the checks.
1997-11-20 17:07:21 +00:00
Nate Williams 133c8c2f49 - Renamed <pccard/card.h> -> <pccard/cardinfo.h>.
Forgotten by:		me
Reminded by:		Bruce
1997-11-20 15:48:41 +00:00
Bruce Evans 4a162126e5 Removed unused #includes.
Fixed bugs in rev.1.35:
- nonblocking mode was per-device instead of per-file.
- lots of style bugs.
1997-11-18 16:01:15 +00:00
Bruce Evans f2a6e0bc19 Get select stuff by including <sys/select.h> instead of <sys/proc.h>,
and don't include <sys/fcntl.h>.  (The select -> poll changes replaced
fcntl macros by poll macros.)

Use <machine/*.h> instead of <i386/include/*.h>.

Fail the probe instead of crashing in the unlikely event that malloc()
fails.
1997-11-18 12:21:32 +00:00
Bruce Evans 8318e21b25 Don't #include <i386/isa/isa_device.h>. It is now a prerequisite. 1997-11-18 11:47:04 +00:00
Bruce Evans 9b54c25692 Removed unused #includes.
Fixed #include order.  <i386/isa/isa_device.h> will soon be a prerequisite
for <i386/isa/pnp.h>.  Including both in alphebetical order gets this
right naturally.
1997-11-18 11:45:26 +00:00
Bruce Evans e0605ebd12 Removed an unused #included.
Ifdefed #includes that are not used in the SMP case.
1997-11-18 11:32:31 +00:00
Bruce Evans 3b29bc9d27 Get select stuff by #including <sys/select.h> instead of <sys/proc.h>. 1997-11-18 11:30:10 +00:00
Bruce Evans 41d022ae9c Removed #unused includes.
Added a used #include (don't depend on yet to be fixed namespace pollution).
1997-11-18 11:16:56 +00:00
Bruce Evans 494bc6f09d Removed code for the !KERNEL case. It hasn't been maintained for 4
years and gives a "laugh"able number of compile-time errors (see the
comment).  main() just printed the struct sizes.  This can be done
better by compiling with -g and reading off the sizes from the stabs.

Sorted #includes.

Fixed an unsigned vs signed comparison.
1997-11-18 10:56:41 +00:00
Bruce Evans 8fa40736f6 Don't #include <machine/smp.h> even in the SMP case. Fixed the one
place that depended on it.  The "bazillion warnings" mentioned in the
log for rev.1.45 apparently aren't a problem any more.  It is hard
to be sure because the SIMPLELOCK_DEBUG option turns off (and breaks)
things in the SMP case.
1997-11-18 09:27:23 +00:00
Alexander Langer e43a990070 Typo fix.
PR:		5068
Submitted by:	Studded@dal.net
1997-11-17 13:57:40 +00:00
John-Mark Gurney 8e9ddffa97 fix Jonathan Mini's email address per his request 1997-11-17 07:58:23 +00:00
Amancio Hasty 53eaeb96ba Added support for linux sound ioctls:
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.
1997-11-17 04:00:32 +00:00
Søren Schmidt c2fc1574ce Device # for Jonathan Mini's VESA support. 1997-11-16 10:02:13 +00:00
Andrey A. Chernov 811be69f59 Restore diagnostic fix spammed after merging 1997-11-16 06:23:29 +00:00
Amancio Hasty 9fdd6eda1d Reviewed by: Amancio Hasty
Submitted by:	Amancio Hasty <hasty@star-gate.com>
Added yuv12 support for mpeg encoding and Randall Hopper's fixed for Temporal
Decimation
1997-11-16 04:52:29 +00:00
John Polstra 56fac9328e Expand the APMIO_GETINFO ioctl to return the estimated remaining
battery time.  For backward compatibility with old binaries, I
assigned a new ioctl number for this call, and retained the old
one as APMIO_GETINFO_OLD.  I also added eight words of padding and
a version field, so that future enhancements won't require jumping
through this hoop again.
1997-11-12 04:12:51 +00:00
Nate Williams 3dbeebf69c - Added PSM_HOOKAPM & PSM_RESETAFTERSUSPEND options.
OK'd by:	Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
1997-11-11 00:47:01 +00:00
Mark Murray b41c00fa66 Fix conflicts. 1997-11-10 18:31:35 +00:00
Bruce Evans 326b780b04 Fixed chip_offsets[] which I broke in rev.1.53. The offsets aren't
actually offsets, they are offsets scaled by dividing by 2^cy_align.
I use different values for cy_align since the -current values are
unnaturally scaled, so I need different offsets, and the wrong
offsets got committed.

Reported by:	nnd@itfs.nsk.su (N.Dudorov)
1997-11-10 15:46:33 +00:00
Nate Williams aaa7085e4b - Convert c++ comment to c comment.
Noted by: 	Bruce
1997-11-10 14:38:08 +00:00
Mike Smith 3da4461a71 Assign 84 to Andrew Gordon <arg@arg1.demon.co.uk> for the 'ttxt' Unitext
teletext decoder.
1997-11-10 03:50:29 +00:00
Tor Egge 31e5225482 Use UPAGES when setting up private pages for SMP (which includes idle stack). 1997-11-07 19:58:34 +00:00
Poul-Henning Kamp 0abc78a697 Rename some local variables to avoid shadowing other local variables.
Found by: -Wshadow
1997-11-07 09:21:01 +00:00
Poul-Henning Kamp 4a11ca4e29 Remove a bunch of variables which were unused both in GENERIC and LINT.
Found by:	-Wunused
1997-11-07 08:53:44 +00:00
Poul-Henning Kamp cb226aaa62 Move the "retval" (3rd) parameter from all syscall functions and put
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.
1997-11-06 19:29:57 +00:00
Mark Murray 8274fc64c2 Add the IOCTL for Luigi's BT848 -> I2C bus driver. 1997-11-06 07:00:45 +00:00
Mike Smith 41631559ba Bump configvers to 300003 to account for the crd->card (and related)
namespace changes.
1997-11-06 03:11:40 +00:00
KATO Takenori 39f451d763 Identify MediaGX CPU correctly. Old MeidaGX CPU and GXm CPU are
distinguished.  CPU-classes of MeidaGX CPU and GXm CPU are 486-class
and 586-class, respectively.

PR:		4936
1997-11-06 03:10:28 +00:00
Søren Schmidt b113690ced Oops, forgot to count non-changer drives..
Broken by: sos
Reported by: phk
1997-11-05 21:32:00 +00:00
KATO Takenori f9c1acbf97 Fix rare 6x86 CPU whose DIR0 = 0x20 - 0x28 case. 1997-11-05 15:12:44 +00:00
Andrey A. Chernov dc185d2298 Do not print config details twice (first variant comes from isa)
Format config messages properly (with initial snd0: prefix)
1997-11-05 00:23:26 +00:00
Steve Price 0f1d6a82dd Note that the Intel EtherExpress' driver is ie(4). 1997-11-04 21:11:14 +00:00
Nate Williams a61408ab2c - Update the email address in the copyrights. 1997-11-04 18:12:51 +00:00
Nate Williams 5796e497dc - If the APM BIOS fails to suspend the system after running the
suspend hooks, run the resume hooks to re-configure the system back
  to where it was.
1997-11-04 17:37:52 +00:00
Poul-Henning Kamp 89d664b2dc dk_altport is initialized in wdprobe(), but not in wdattach(), this
breaks wdreset(), wdunwedge() &c &c.

Should be examined in detail by:	dyson
1997-11-04 09:28:54 +00:00
KATO Takenori 788217f130 Use same address for USERCONFIG_BOOT on PC-98 as IBM-PC.
Submitted by:	H. Nokubi <h-nokubi@nmit.tmg.nec.co.jp>
Forgotten by:	kato
1997-11-04 03:19:25 +00:00
Guido van Rooij 03486e0a41 Test if kvm_kernel.db exists before moving it. Otherwise installing
a kernel, booting single user and reinstalling a kernel fails.
1997-11-03 21:48:31 +00:00
Nate Williams 241fe562b4 - MF22: (I reversed these). Simplify code. 1997-11-02 21:26:14 +00:00
Jordan K. Hubbard 60685f39ce Add ide_pci device. 1997-11-02 20:35:07 +00:00
David Greenman 12a5bd8bcf Sigh, kill setting of 0WS...it breaks more machines than it fixes. 1997-11-02 07:12:52 +00:00
Nate Williams 5a2f754644 - Example config file for laptop/PCCARD support. 1997-11-01 18:54:10 +00:00
Justin M. Seger c198e6ecd9 Change comments about ijppp to iijppp.
PR:		conf/4905
Submitted by:	takas-su@is.aist-nara.ac.jp
1997-10-31 22:10:09 +00:00
Mark Murray 415d4cb37a Bring our sound sources up to the level of Amancio's latest-and-greatest.
This corresponds to Voxware 3.5-alpha-<something> and Amancio's guspnp21.
There was a bit of a FUBAR during the commmit, so not all files are
mentioned in this commit's mail.

X-rant:	I have just started to _*HATE*_ CVS...
1997-10-31 17:25:35 +00:00
John-Mark Gurney faac9650a5 This updates Luigi's sound code to the basic code in snd971023...
changes:
    o rip the old select from his distribution to prevent extra pollution
    o the code now uses audio dma, helps reduce clicks
    o improved card support, should work in full duplex on sb16 cards
    o add better voxware ioctl support pointed out by Joao Carlos Mendes
       Luis <jonny@coppe.ufrj.br>
    o remove an unused file that I included for more complete history
    o and MANY other changes

I have personally tested this code with a CS4237 based card and an AWE32
(non-PnP).  Both cards worked fine in 8bit and 16bit mode.
1997-10-31 12:24:28 +00:00
Mark Murray 1fa24a09c7 Upgrade the sound sources to Amancio Hasty's latest-and-greatest.
This is based on Voxware 3.5, and corresponds to Amancio's `guspnp21'.

Bug reports to Amancio, please!
1997-10-31 06:30:22 +00:00
KATO Takenori 1d07b128d5 Securelevel and formatting fixes, and trapframe simplification.
Reviewed by:	sos
Submitted by:	bde
1997-10-30 10:53:30 +00:00
Søren Schmidt cac2057a29 First cut at supporting multi-CD CDROM drives (changers).
Very rudimentary, lots of error checks missing, but it works.
Dont do an ls on two different CD's though, it will eat your
changer mechanism for lunch :), this clearly needs some more
thought. Until then this will enable those with changers to
mount their multible CD's and doing "sensible" work....

Thanks to Andrew Gordon <arg@arg1.demon.co.uk> for donating a drive
(a NEC CDR-C251 4x4) that makes this possible to develop.
1997-10-29 22:11:00 +00:00
Nate Williams be8e398409 - Make sure we include <sys/kernel.h> to pick up the definitions of DATA_SET()
Noticed by:	bde
1997-10-29 15:54:19 +00:00
KATO Takenori 404c835d69 Implement linux_iopl and linux_nice. 1997-10-29 08:17:14 +00:00
John Polstra 0e5e974182 The previous change added a use of the DATA_SET macro, but forgot
to define it by including <sys/kernel.h>.  That broke PC-CARD
support for this driver, producing the dreaded "device allocation
failed" message.  Surprisingly, the missing include caused only
two compiler warnings.  The compilation still "succeeded" anyway.
1997-10-29 00:51:50 +00:00
Bruce Evans 55b211e3af Removed unused #includes. 1997-10-28 15:59:26 +00:00
Bruce Evans 7f47cf2f4a Don't include <machine/cputypes.h> or declare cputype/class interfaces
in <machine/cpu.h>.  Moved the declarations to <machine/cputypes.h>.
Fixed style bugs in the moved code.  Fixed everything that depended on
the nested include.  Don't include <machine/cpu.h> (in the changed files)
unless something in it is used directly.
1997-10-28 11:43:57 +00:00
KATO Takenori 9b86a4168f Implement linux_semop, linux_semget and linux_semctl.
PR:		4355
1997-10-28 10:50:02 +00:00
Joerg Wunsch ebc1f80ca7 Use the new "mandatory" keyword for the npx driver. 1997-10-28 07:28:34 +00:00
Joerg Wunsch 343b84b4e8 Removed another comment about not-so-mandatory devices i've missed in
the previous commit.  It's perfectly legal to build a kernel without
any video device driver (and even without any console driver at all if
desired).
1997-10-28 07:27:48 +00:00
Joerg Wunsch 1160da921f Remove the stale `log' non-pseudodevice.
Found by:	the new config(8) ;-)
1997-10-28 07:24:35 +00:00
Bruce Evans 4090154b9e Moved declaration of etext from <machine/md_var.h> to <machine/cpu.h>
and fixed everything that dependended on it being declared in the old
place.  It is used in "machine-independent" code in subr_prof.c.

Moved declaration of btext from subr_prof.c to <machine/cpu.h>.  It
is machine-dependent.
1997-10-27 17:23:18 +00:00
Bruce Evans b3c0d23251 Oops, <machine/psl.h> is used unconditionally in -current. 1997-10-27 17:19:20 +00:00