Commit Graph

782 Commits

Author SHA1 Message Date
John Dyson
471176aa5d Fix alot of silly LINT that I left in the code. 1998-05-12 18:28:05 +00:00
John Dyson
5498a452bc Support better performance with P6 architectures and in SMP
mode.  Unnecessary TLB flushes removed.  More efficient
page zeroing on P6 (modify page only if non-zero.)
1998-05-11 02:13:47 +00:00
John Dyson
f0175db1ee Attempt to set write combining mode for graphics devices. 1998-05-11 01:06:08 +00:00
Justin T. Gibbs
8fddb21ee2 Implement bus_dmamem_* functions and correct a few nits reported by Peter Wemm. 1998-05-06 01:45:55 +00:00
Dag-Erling Smørgrav
bf69d84c0a Cast return values to the appropriate fp_*_t. Note that the man page
incorrectly refers to them as e.g. fp_except rather than fp_except_t.

PR:		misc/6310
Submitted by:	Niall Smart
1998-04-27 14:17:30 +00:00
Peter Wemm
4bc57bd94f Add a couple of missing symbols referred to in asm code. 1998-04-22 09:46:16 +00:00
Bruce Evans
8c4a6d7452 Support compiling with `gcc-pedantic' (don't use hard newlines in
(asm) string constants or trailing commas in enum declarations).
1998-04-19 15:28:30 +00:00
Peter Wemm
514bc6cb56 Fix VM86 compiles. a #include "opt_vm86.h" was missing, and the my_tr
variable was needed in the non-SMP case.

Submitted by:  Jonathan Lemon <jlemon@americantv.com>
1998-04-06 18:59:15 +00:00
Peter Wemm
cf34ef61ee Use real types for the SMP pages being allocated rather than arrays of
ints.  Remove some no longer needed casts.  Initialize the per-cpu
global data area using the structs rather than knowing too much about
layout, alignment, etc.
1998-04-06 15:48:30 +00:00
Peter Wemm
937288c5bb A pair of C structures used for laying out the SMP per-cpu data space. 1998-04-06 15:37:21 +00:00
Peter Wemm
5d0ef2fd65 some missing symbols 1998-04-06 15:33:02 +00:00
Poul-Henning Kamp
8184a0a4d1 Remove stuff related to microtime.s, which is gone. 1998-04-06 11:38:18 +00:00
Poul-Henning Kamp
2eeb0e2ea0 Make read_random() take a (void *) argument instead of (char *) 1998-04-06 09:30:42 +00:00
Poul-Henning Kamp
4cf41af3d4 Make a kernel version of the timer* functions called timerval* to be
more consistent.

OK'ed by:	bde
1998-04-06 08:26:08 +00:00
Poul-Henning Kamp
00af9731c9 Time changes mark 2:
* Figure out UTC relative to boottime.  Four new functions provide
      time relative to boottime.

    * move "runtime" into struct proc.  This helps fix the calcru()
      problem in SMP.

    * kill mono_time.

    * add timespec{add|sub|cmp} macros to time.h.  (XXX: These may change!)

    * nanosleep, select & poll takes long sleeps one day at a time

Reviewed by:    bde
Tested by:      ache and others
1998-04-04 13:26:20 +00:00
Tor Egge
5758c2de94 Add two workarounds for broken MP tables:
- Attempt to handle PCI devices where the interrupt is
	  an ISA/EISA interrupt according to the mp table.

	- Attempt to handle multiple IO APIC pins connected to
	  the same PCI or ISA/EISA interrupt source.  Print a
	  warning if this happens, since performance is suboptimal.
	  This workaround is only used for PCI devices.

With these two workarounds, the -SMP kernel is capable of running on
my Asus P/I-P65UP5 motherboard when version 1.4 of the MP table is disabled.
1998-04-01 21:07:37 +00:00
Tor Egge
300e9a7696 Declare some variables modified by interrupt handlers as volatile. 1998-04-01 20:38:28 +00:00
Jonathan Lemon
640c4313af Add the ability to make real-mode BIOS calls from the kernel. Currently,
everything is contained inside #ifdef VM86, so this option must be
present in the config file to use this functionality.

Thanks to Tor Egge, these changes should work on SMP machines.  However,
it may not be throughly SMP-safe.

Currently, the only BIOS calls made are memory-sizing routines at bootup,
these replace reading the RTC values.
1998-03-23 19:52:59 +00:00
Peter Wemm
e93eb8a353 Several changes:
- Implement proper EISA probing.
 - Better support for the new transputer based host cards.
 - use standard termios settings, one can use the intial/lock devices.
 - use a simple bcopy since some cards/systems apparently don't support
   32 bit accesses.
 - hard reset and halt host card CPU prior to download in case of a soft
   restart.
 - recognize new remote module types (ASIC vs. CD1400 based)
 - a number of cosmetic changes (my fault, not Nick's)

Submitted by:  Nick Sayer <nsayer@quack.kfu.com>
1998-03-23 16:27:43 +00:00
Peter Wemm
d53b8e5f34 merge from 2.2 1998-03-21 06:17:14 +00:00
John Dyson
8f9110f6a1 This mega-commit is meant to fix numerous interrelated problems. There
has been some bitrot and incorrect assumptions in the vfs_bio code.  These
problems have manifest themselves worse on NFS type filesystems, but can
still affect local filesystems under certain circumstances.  Most of
the problems have involved mmap consistancy, and as a side-effect broke
the vfs.ioopt code.  This code might have been committed seperately, but
almost everything is interrelated.

1)	Allow (pmap_object_init_pt) prefaulting of buffer-busy pages that
	are fully valid.
2)	Rather than deactivating erroneously read initial (header) pages in
	kern_exec, we now free them.
3)	Fix the rundown of non-VMIO buffers that are in an inconsistent
	(missing vp) state.
4)	Fix the disassociation of pages from buffers in brelse.  The previous
	code had rotted and was faulty in a couple of important circumstances.
5)	Remove a gratuitious buffer wakeup in vfs_vmio_release.
6)	Remove a crufty and currently unused cluster mechanism for VBLK
	files in vfs_bio_awrite.  When the code is functional, I'll add back
	a cleaner version.
7)	The page busy count wakeups assocated with the buffer cache usage were
	incorrectly cleaned up in a previous commit by me.  Revert to the
	original, correct version, but with a cleaner implementation.
8)	The cluster read code now tries to keep data associated with buffers
	more aggressively (without breaking the heuristics) when it is presumed
	that the read data (buffers) will be soon needed.
9)	Change to filesystem lockmgr locks so that they use LK_NOPAUSE.  The
	delay loop waiting is not useful for filesystem locks, due to the
	length of the time intervals.
10)	Correct and clean-up spec_getpages.
11)	Implement a fully functional nfs_getpages, nfs_putpages.
12)	Fix nfs_write so that modifications are coherent with the NFS data on
	the server disk (at least as well as NFS seems to allow.)
13)	Properly support MS_INVALIDATE on NFS.
14)	Properly pass down MS_INVALIDATE to lower levels of the VM code from
	vm_map_clean.
15)	Better support the notion of pages being busy but valid, so that
	fewer in-transit waits occur.  (use p->busy more for pageouts instead
	of PG_BUSY.)  Since the page is fully valid, it is still usable for
	reads.
16)	It is possible (in error) for cached pages to be busy.  Make the
	page allocation code handle that case correctly.  (It should probably
	be a printf or panic, but I want the system to handle coding errors
	robustly.  I'll probably add a printf.)
17)	Correct the design and usage of vm_page_sleep.  It didn't handle
	consistancy problems very well, so make the design a little less
	lofty.  After vm_page_sleep, if it ever blocked, it is still important
	to relookup the page (if the object generation count changed), and
	verify it's status (always.)
18)	In vm_pageout.c, vm_pageout_clean had rotted, so clean that up.
19)	Push the page busy for writes and VM_PROT_READ into vm_pageout_flush.
20)	Fix vm_pager_put_pages and it's descendents to support an int flag
	instead of a boolean, so that we can pass down the invalidate bit.
1998-03-07 21:37:31 +00:00
Tor Egge
1516126e28 Reenable redirection of clock interrupt to a higher priority vector.
setidt() now knows about f00f_hack(), and the APs now use the same
interrupt descriptor table as the BSP.
1998-03-07 20:48:16 +00:00
Tor Egge
1146c3560f The APs now reload the interrupt descriptor table pointer after
f00f_hack has run.

Use the global r_idt descriptor in f00f_hack when in SMP mode,
so the APs find the relocated interrupt descriptor table.

Submitted by:	Partially from David A Adkins <adkin003@tc.umn.edu>
1998-03-07 20:16:49 +00:00
Tor Egge
5dd528cd4e Remove special handling for resuming clock interrupt when using APIC_IO.
The `generic' vector stubs do the right thing.
1998-03-05 21:45:53 +00:00
Tor Egge
540d82e3b4 Disable redirection of clock interrupt to a higher priority vector.
This does not work on most dual Pentium machines, due to setidt()
being neutralized by f00f_hack().
1998-03-04 23:45:12 +00:00
KATO Takenori
3a94cb7f7d Defined CCR6 and CCR7 (configuration registers of M2 CPU.) 1998-03-04 11:39:16 +00:00
Peter Wemm
f688ebc13a Fix recent breakage when compiling under elf.
_Xforward_irq         -> Xforward_irq
_apic_isrbit_location -> apic_isrbit_location
_cpu_num_to_apic_id   -> cpu_num_to_apic_id
_invltlb_ok           -> invltlb_ok
1998-03-04 09:55:13 +00:00
Tor Egge
02c1dc3bbc When entering the apic version of slow interrupt handler, level
interrupts are masked, and EOI is sent iff the corresponding ISR bit
is set in the local apic. If the CPU cannot obtain the interrupt
service lock (currently the global kernel lock) the interrupt is
forwarded to the CPU holding that lock.

Clock interrupts now have higher priority than other slow interrupts.
1998-03-03 22:56:30 +00:00
Tor Egge
3163861c7b Forward the signal if the process runs on a different CPU. This reduces
the signal handling latency for cpu-bound processes that performs very
few system calls.

The IPI for forcing an additional software trap is no longer dependent upon
BETTER_CLOCK being defined.
1998-03-03 20:55:26 +00:00
Tor Egge
fe9cd27373 Reduce timeout before assuming that forwarding of hardclock or softclock
failed. Don't complain on forwarding failure, unless
BETTER_CLOCK_DIAGNOSTIC is defined.
1998-03-03 20:09:14 +00:00
Tor Egge
221e0c595b forward_statclock and forward_hardclock are located in mp_machdep.c. 1998-03-03 19:44:34 +00:00
John Dyson
ffc82b0a70 1) Use a more consistent page wait methodology.
2)	Do not unnecessarily force page blocking when paging
	pages out.
3)	Further improve swap pager performance and correctness,
	including fixing the paging in progress deadlock (except
	in severe I/O error conditions.)
4)	Enable vfs_ioopt=1 as a default.
5)	Fix and enable the page prezeroing in SMP mode.

All in all, SMP systems especially should show a significant
improvement in "snappyness."
1998-03-01 04:18:54 +00:00
Amancio Hasty
d7ef1f6051 Radio support for bt848 cards from Flemming Jacobsen <fj@trw.nl>
Amancio
1998-02-26 08:19:14 +00:00
John Dyson
660957521c Fix page prezeroing for SMP, and fix some potential paging-in-progress
hangs.  The paging-in-progress diagnosis was a result of Tor Egge's
excellent detective work.
Submitted by:	Partially from Tor Egge.
1998-02-25 03:56:15 +00:00
Bruce Evans
6aeb4f6474 Removed vestiges of previous microtime() implementation. 1998-02-25 02:20:30 +00:00
John Dyson
d9bed5bee1 Try to dynamically size the VM_KMEM_SIZE (but is still able to be overridden
in a way identically as before.)  I had problems with the system properly
handling the number of vnodes when there is alot of system memory, and the
default VM_KMEM_SIZE.  Two new options "VM_KMEM_SIZE_SCALE" and
"VM_KMEM_SIZE_MAX" have been added to support better auto-sizing for systems
with greater than 128MB.

Add some accouting for vm_zone memory allocations, and provide properly
for vm_zone allocations out of the kmem_map.  Also move the vm_zone
allocation stats to the VM OID tree from the KERN OID tree.
1998-02-23 07:42:43 +00:00
Poul-Henning Kamp
7ec73f6417 Replace TOD clock code with more systematic approach.
Highlights:
    * Simple model for underlying hardware.
    * Hardware basis for timekeeping can be changed on the fly.
    * Only one hardware clock responsible for TOD keeping.
    * Provides a real nanotime() function.
    * Time granularity: .232E-18 seconds.
    * Frequency granularity:  .238E-12 s/s
    * Frequency adjustment is continuous in time.
    * Less overhead for frequency adjustment.
    * Improves xntpd performance.

Reviewed by:    bde, bde, bde
1998-02-20 16:36:17 +00:00
Mike Smith
1f98b2eb0f Remove the 'qcam' driver. Development has ceased, and the driver is
nonfunctional.
Submitted by:	pst (conversation some time ago)
1998-02-18 13:43:59 +00:00
Marc G. Fournier
a7b4a3794c soundcard.h wasn't upgraded when i386/isa/snd was 1998-02-18 02:27:00 +00:00
Marc G. Fournier
eebeedcca7 Upgrade Luigi's audio driver to Jan/23 version... will bring in Feb/15th
version as soon as I've tested it...

Installed/tested on my home machine...any problems, please report directly
to me.
1998-02-17 14:03:10 +00:00
KATO Takenori
9dca5248c5 Enable NEC 86 sound card when PC98 is defined.
Submitted by:	Takahashi Yoshihiro <nyan@wyvern.cc.kogakuin.ac.jp>
1998-02-17 03:15:30 +00:00
Peter Wemm
a397086e61 Update to support SI/XIO PCI host cards (Z280 based) and the enhanced
SXISA and SXPCI host cards (Transputer based).

PR: 4836, 5021, 5654
Submitted by:  Nick Sayer <nick@specialix.com>
1998-02-15 14:42:33 +00:00
Poul-Henning Kamp
befeeb59cb Add display of type KD_PIXEL. 1998-02-12 20:47:39 +00:00
Eivind Eklund
303b270b0a Staticize. 1998-02-09 06:11:36 +00:00
John Dyson
95461b450d 1) Start using a cleaner and more consistant page allocator instead
of the various ad-hoc schemes.
2)	When bringing in UPAGES, the pmap code needs to do another vm_page_lookup.
3)	When appropriate, set the PG_A or PG_M bits a-priori to both avoid some
	processor errata, and to minimize redundant processor updating of page
	tables.
4)	Modify pmap_protect so that it can only remove permissions (as it
	originally supported.)  The additional capability is not needed.
5)	Streamline read-only to read-write page mappings.
6)	For pmap_copy_page, don't enable write mapping for source page.
7)	Correct and clean-up pmap_incore.
8)	Cluster initial kern_exec pagin.
9)	Removal of some minor lint from kern_malloc.
10)	Correct some ioopt code.
11)	Remove some dead code from the MI swapout routine.
12)	Correct vm_object_deallocate (to remove backing_object ref.)
13)	Fix dead object handling, that had problems under heavy memory load.
14)	Add minor vm_page_lookup improvements.
15)	Some pages are not in objects, and make sure that the vm_page.c can
	properly support such pages.
16)	Add some more page deficit handling.
17)	Some minor code readability improvements.
1998-02-05 03:32:49 +00:00
Bruce Evans
a8961a8284 Ifdefed some SMP and VM86 code. Note that although VM86 is not a global
option, the ifdef on it in a header works because only the name of the
VM86 extension is hidden.
1998-02-03 21:27:50 +00:00
Bruce Evans
318ed3ed7a Forward declare a union so that this file is self-sufficient.
Cleaned up ifdefs.
1998-02-03 20:46:18 +00:00
Bruce Evans
b9759fe4f9 Fixed a gratuitous ANSIism. 1998-02-03 20:37:29 +00:00
Bruce Evans
7a1a679ecb Ifdefed use of a GNU feature. 1998-02-03 20:32:38 +00:00
Bruce Evans
65fa467e59 Moved misplaced idempotency ifdef. Multiple inclusion was fatal since
there was a typedef outside the ifdef.

Fixed syntax error after the #endif for this ifdef.

Didn't fix the usual style bugs for this ifdef...
1998-02-03 20:24:13 +00:00
Bruce Evans
98a6e74553 Changed inline' to __inline' so that this file can be compiled by
`gcc -ansi'.

Changed NULL to 0 so that this file is more self-sufficient (now
only <sys/types.h> is a prerequisite).
1998-02-03 20:14:35 +00:00
Bruce Evans
eafe3040d4 Don't declare prototypes for driver functions unless KERNEL is defined. 1998-02-03 20:07:02 +00:00
Bruce Evans
919de96974 Fixed conflicts between <machine/console.h> and <machine/pcvt_ioctl.h>,
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).
1998-02-03 19:57:46 +00:00
Amancio Hasty
2b1973e8ad Bugs/Enhancements:
1. Takeshi Ohashi <ohashi@atohasi.mickey.ai.kyutech.ac.jp> submitted
   code to support bktr_read . /usr/src/share/examples/rgb24.c now works 8)

2. Flemming Jacobsen <fj@schizo.dk.tfs.com> submitted code to support
   radio available with in some bt848 based cards;additionally, wrote
   code to correctly recognized his bt848 card.
3. Roger Hardiman <roger@cs.strath.ac.uk> submitted various fixes to smooth
   out the microcode and made all modes consistent.

4. Added supported for yuv12 so we know can capture raw streams and feed it
   to mpeg_encoder . The upshot is that we can now mpeg encode more and save
   nearly 100 percent of the disk requirements previously for programs such
   as fxtv first save the raw video image to disk then converted to a
   format suitable for mpeg_encode.
1998-02-02 13:09:12 +00:00
Bruce Evans
af3b301b36 Fixed disordering of busdma* and swi_vm. 1998-02-01 23:00:53 +00:00
Bruce Evans
e29b867bd6 Fixed a recently broken comment. 1998-02-01 22:45:23 +00:00
Bruce Evans
da171a03a8 Use <machine/*.h> instead of <i386/include/*.h>. 1998-02-01 22:23:18 +00:00
Peter Wemm
7ee3907f2a re-sort back into order 1998-01-26 04:44:32 +00:00
Peter Wemm
855b08ed7b Add missing definition for swi_vm 1998-01-26 04:41:23 +00:00
KATO Takenori
e881afe741 Undo previous commit. The cpuid symbol has been already used by SMP
stuff.

Pointed-out by:	Manfred Antar <root@mantar.slip.netcom.com>
1998-01-25 23:45:41 +00:00
KATO Takenori
31e6b13443 Added cpuid instruction. 1998-01-25 17:02:00 +00:00
John Dyson
50ce7ff499 Add better support for larger I/O clusters, including larger physical
I/O.  The support is not mature yet, and some of the underlying implementation
needs help.  However, support does exist for IDE devices now.
1998-01-24 02:01:46 +00:00
Justin T. Gibbs
44be5ce870 Add prototypes for swi_vm, setsoftvm, schedsoftvm, and splsoftvm that were
missed when I originally committed the bus dma code.
1998-01-21 18:28:49 +00:00
John Birrell
013239afdf Suggested by: bde
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.
1998-01-20 09:09:24 +00:00
Justin T. Gibbs
e1a1bba4fa Implementation of Bus Space for FreeBSD-x86.
Obtained From: NetBSD
1998-01-15 07:32:56 +00:00
John Birrell
a1db8c36a5 Add a machine dependent header for the i386 jmp_buf size instead of piling
machine dependent definitions into src/include/setjmp.h.
1998-01-10 23:04:51 +00:00
John-Mark Gurney
6cc3943ff0 update the AWE32 wave table driver to Iwai's 0.4.2c version. This also
includes the patches to make it work under -current from Randall Hopper.

Remove the old AWE driver.
1998-01-08 23:13:22 +00:00
Alexander Langer
eb794faa90 Define integer types added by POSIX.1g. We already had int8_t, int16_t,
and int32_t -- this adds their unsigned counterparts uint8_t, uint16_t,
and uint32_t.  Bruce has noted that C9x also defines these types (in a
different file), so this may have to be revisited with some ifdefs at a
later date.

Reviewed by:	bde
1998-01-08 00:27:34 +00:00
Kazutaka YOKOTA
a3bd3dac25 Added accent (dead) key support to syscons and kbdcontrol.
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).
1998-01-07 08:40:34 +00:00
Bruce Evans
82d86d3750 Moved the SMP declarations of INTREN() and INTRDIS() to the correct header,
i.e., the same header as corresponding non-SMP #defines.
1998-01-01 08:47:17 +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
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
Peter Wemm
9b73941153 Add missing references to Xcpuast, get_isrlock and checkstate_probed_cpus 1997-12-18 02:09:29 +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
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
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
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
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
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
Tor Egge
31e5225482 Use UPAGES when setting up private pages for SMP (which includes idle stack). 1997-11-07 19:58:34 +00:00
Mark Murray
8274fc64c2 Add the IOCTL for Luigi's BT848 -> I2C bus driver. 1997-11-06 07:00:45 +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
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
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
Jordan K. Hubbard
7416845fdd Bump MAXDSIZ to 512MB so that soft limits have a chance to actually
regulate this.
Reviewed by:	dyson
1997-10-27 00:38:46 +00:00
Kazutaka YOKOTA
63f87bd194 Rename MOUSE_GETINFO to MOUSE_GETHWINFO. The name collided with the one
in console.h.
Pointed out by bde.
1997-10-19 10:45:18 +00:00
Peter Wemm
0c111a5c17 Try and fix some style problems 1997-10-12 15:24:39 +00:00
Peter Wemm
b54470b433 Don't #include unneeded includes here. pcb_ext.h picks up lots of other
stuff with it.
1997-10-10 12:40:09 +00:00
Peter Wemm
98823b2366 Convert the VM86 option from a global option to an option only depended
on by the files that use it.  Changing the VM86 option now only causes
a recompile of a dozen files or so rather than the entire kernel.
1997-10-10 09:44:12 +00:00
Mark Murray
d32591560a Latest round of patches from the author.
This driver includes the following patches submitted by:

1.0 Hideyuki Suzuki <hideyuki@sat.t.u-tokyo.ac.jp>
Japanese Cable support

2.0 Keith Sklower <sklower@CS.Berkeley.EDU>
Minor update to the BSDI section so it compiles cleanly on BSDI

3.0 Joao Carlos Mendes Luis <jonny@coppe.ufrj.br>
ioctl interface to select video format , NTSC, PAL, etc...
1997-10-07 06:30:01 +00:00
John Dyson
42c0de4926 It is possible that MB's with really broken bios's not set up more of
the mtrr registers.  This just fills in more of the registers.
1997-10-06 02:11:32 +00:00
John Dyson
c63ba9f5ae Make sure that the memory type registers are the same for each CPU
in a P6 SMP system.  Some MB bios'es don't set the registers up correctly
for the AP's.  Additionally, set the memory between 0xa0000 and 0xbffff
as write combining.
1997-10-05 03:19:29 +00:00
Søren Schmidt
3bd724f2b3 Add a new keyboard mode K_CODE. Returns a single byte for each key
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.
1997-10-01 20:46:29 +00:00
Peter Wemm
ec7bb87229 oops, I seem to have forgotten to commit this. redirect _cam_imask to
cam_imask when compiling under elf.
1997-09-29 02:17:42 +00:00
Justin T. Gibbs
47558d4d77 ipl.h:
Add CAM software/hardware interrupt support.

si.h:
	Update for changes in the callout interface.
1997-09-21 21:38:54 +00:00
Peter Wemm
dfd5aef3a8 Implement the parts needed for VM86 under SMP. 1997-09-21 15:03:59 +00:00
John Dyson
a65247e12c Add support for more than 1 page of idle process stack on SMP systems. 1997-09-21 05:50:02 +00:00
Peter Wemm
35b8b2ddab Update select -> poll in drivers. 1997-09-14 03:19:42 +00:00
Joerg Wunsch
cae6f73ac2 Revert the logic behind my last change, and use a function called
`is_physical_memory()' now for the decision whether to dump some
region of memory or not.

Suggested by:	davidg
1997-09-13 16:12:15 +00:00
Peter Wemm
452b527e36 Patch up some more undefined symbols when compiling under ELF. 1997-09-13 16:00:30 +00:00
Joerg Wunsch
e0b78e19f2 Do not ever try to coredump adapter memory regions.
PR:		4486
Submitted by:	tegge@idi.ntnu.no (Tor Egge)

Implement a function is_adapter_memory() in order to determine what
should nto be dumped at all.  Currently, only populated with the ``ISA
memory hole''.  Adapter regions of other busses should be added.
1997-09-10 12:31:40 +00:00
Mark Murray
51c63b7d63 Amancio's latest in the Brooktree driver.
This fixes the european frequency set, separates this further from the
Meteor driver and fixes bugs.
1997-09-09 06:32:32 +00:00
Peter Wemm
929ea59a92 Add missing redirection for _inside_intr -> inside_intr 1997-09-08 00:25:05 +00:00
Steve Passe
af184246e1 DISABLE LEVEL_3 lock pushdown, somethings seems to have broken! 1997-09-07 23:06:15 +00:00
Steve Passe
20233f27f4 General cleanup of the lock pushdown code. They are grouped and enabled
from machine/smptests.h:

#define PUSHDOWN_LEVEL_1
#define PUSHDOWN_LEVEL_2
#define PUSHDOWN_LEVEL_3
#define PUSHDOWN_LEVEL_4_NOT
1997-09-07 22:04:09 +00:00
Peter Wemm
c9c5eae40a Add redirection for new _clock_lock symbol 1997-09-05 08:47:24 +00:00
KATO Takenori
cca7e880b9 Always defines macros for PC-98 display. 1997-09-04 09:05:17 +00:00
Steve Passe
1de995bb1f General cleanup of the sub-system locking macros.
Eliminated the RECURSIVE_MPINTRLOCK.
clock.c and microtime use clock_lock.
sio.c and cy.c use com_lock.

Suggestions by:	Bruce Evans <bde@zeta.org.au>
1997-09-01 07:45:37 +00:00
Steve Passe
7245dff0f1 Cleanup. 1997-09-01 07:31:54 +00:00
Bruce Evans
e28b96049b Move closer to supporting VM86 under SMP.
LINT now compiles but doesn't link.  Other link-time breakage for LINT
is now visible (SMP is incompatible with SIMPLELOCK_DEBUG).
Submitted by:	jlemon
1997-09-01 01:54:52 +00:00
Bruce Evans
f3086365a3 Put I*86_CPU options in opt_global.h and don't #include "opt_cpu.h"
centrally.
1997-08-31 22:43:46 +00:00
Steve Passe
2645264a72 Debug version of simple_lock. This will store the CPU id of the
holding CPU along with the lock.  When a CPU fails to get the lock
it compares its own id to the holder id.  If they are the same it
panic()s, as simple locks are binary, and this would cause a deadlock.

Controlled by smptests.h: SL_DEBUG, ON by default.

Some minor cleanup.
1997-08-31 03:17:48 +00:00
Peter Wemm
bf9380893a Define some machine characteristics using symbol naming on conventions
in place in the other BSD's.
1997-08-30 18:59:48 +00:00
Peter Wemm
88d2e69daa Update to include recently added names that are shared between the C and
asm parts of the kernel.  This is to re-enable ELF compile support.
1997-08-30 11:20:02 +00:00
Steve Passe
78292efeef Another round of lock pushdown.
Add a simplelock to deal with disable_intr()/enable_intr() as used in UP kernel.
UP kernel expects that this is enough to guarantee exclusive access to
regions of code bracketed by these 2 functions.
Add a simplelock to bracket clock accesses in clock.c: clock_lock.

Help from:	Bruce Evans <bde@zeta.org.au>
1997-08-30 08:08:10 +00:00
KATO Takenori
662f9a6987 Move MACHINE_ARCH definition from <machine/param.h> to <machine/cpu.h>.
Submitted by:	Bruce Evans <bde@zeta.org.au>
1997-08-30 02:52:04 +00:00
Steve Passe
57fe49bd03 Introduce FAST_HI option, ON by default.
This options allows a CPU that is blocked spinning for the giant lock
to process FAST_INTR() ISRs, eg. siointr().
1997-08-29 17:58:30 +00:00
KATO Takenori
d3e65fbc89 Fix typo in the comment introduced by me. 1997-08-29 11:01:14 +00:00
KATO Takenori
664f85174a Added a sysctl arg, hw.machine_arch. The hw.machine_arch is "ibm-pc"
on IBM-PC box and is "pc-98" on NEC PC-98 box.  Userland program can
distinguish architecture on which the program runs.
1997-08-29 09:03:40 +00:00
Jonathan Lemon
5f07393373 Remove the vm86 support as an LKM, and link it directly into the kernel
if 'options "VM86"' is in the config file.  The LKM was really for
development, and has probably outlived its usefulness.
1997-08-28 14:36:56 +00:00
KATO Takenori
27cb053198 Moved include files which are independent of bs driver. 1997-08-28 09:23:57 +00:00
Peter Wemm
90bcb528a8 Correct some things I forgot about until it was too late with smp_active.
smp_active = 1 used to indicate that the system had frozen previously
started AP's, while smp_active = 0 was "AP's not yet started".  I have split
this into smp_started (which is set when the AP's come online), and
smp_active is left for turning on/off AP scheduling.
1997-08-26 18:36:15 +00:00
Peter Wemm
9a3b3e8bce Clean up the SMP AP bootstrap and eliminate the wretched idle procs.
- We now have enough per-cpu idle context, the real idle loop has been
revived (cpu's halt now with nothing to do).
- Some preliminary support for running some operations outside the
global lock (eg: zeroing "free but not yet zeroed pages") is present
but appears to cause problems.  Off by default.
- the smp_active sysctl now behaves differently. It's merely a 'true/false'
option.  Setting smp_active to zero causes the AP's to halt in the idle
loop and stop scheduling processes.
- bootstrap is a lot safer.  Instead of sharing a statically compiled in
stack a number of times (which has caused lots of problems) and then
abandoning it, we use the idle context to boot the AP's directly.  This
should help >2 cpu support since the bootlock stuff was in doubt.
- print physical apic id in traps.. helps identify private pages getting
out of sync.  (You don't want to know how much hair I tore out with this!)

More cleanup to follow, this is more of a checkpoint than a
'finished' thing.
1997-08-26 18:10:38 +00:00
Bruce Evans
2a2968a896 Removed a bogus comment. 1997-08-25 21:28:08 +00:00
Steve Passe
8ee0110a44 A clean fix for the spl "deadlock before smp_active" problem.
Added a new variable, 'bsp_apic_ready', which is set as soon as the bootstrap
CPU has initialized its local APIC.  Conditionalize the GENSPLR functions
to call ss_lock ONLY after bsp_apic_ready is TRUE;  This should prevent
any problems with races between the time the 1st AP becomes ready and the
time smp_active is set.
1997-08-24 20:33:32 +00:00
Steve Passe
886e789627 The last of the encapsolation of cpl/spl/ipending things into a critical
region protected by the simplelock 'cpl_lock'.

Notes:

 - this code is currently controlled on a section by section basis with
   defines in machine/param.h.  All sections are currently enabled.

 - this code is not as clean as I would like, but that can wait till later.

 - the "giant lock" still surrounds most instances of this "cpl region".
   I still have to do the code that arbitrates setting cpl between the
   top and bottom halves of the kernel.

 - the possibility of deadlock exists, I am committing the code at this
   point so as to exercise it and detect any such cases B4 the "giant lock"
   is removed.
1997-08-24 00:05:37 +00:00
Philippe Charnier
40d5099441 Revert my previous commit about using CS_SECURE macro.
Requested by:	Bruce.
1997-08-21 06:33:04 +00:00
Steve Passe
b3e4e390f6 Moved the COM_LOCK and COM_UNLOCK macros to machine/param.h. 1997-08-21 05:47:25 +00:00
Steve Passe
fcdf862cca Oops, this should have been in last commit.
Adds variable cil: current INTerrupt level.  This is part of the new
MP-safe spl algorithm.
1997-08-21 05:15:08 +00:00
Steve Passe
4a73d99f7e Made PEND_INTS default.
Made NEW_STRATEGY default.
Removed misc. old cruft.

Centralized simple locks into mp_machdep.c
Centralized simple lock macros into param.h

More cleanup in the direction of making splxx()/cpl MP-safe.
1997-08-21 05:08:25 +00:00
Jonathan Lemon
939829795a Add forward declaration for struct proc. 1997-08-20 19:57:24 +00:00
Steve Passe
7b185ef809 Preperation for moving cpl into critical region access.
Several new fine-grained locks.
New FAST_INTR() methods:
 - separate simplelock for FAST_INTR, no more giant lock.
 - FAST_INTR()s no longer checks ipending on way out of ISR.
sio made MP-safe (I hope).
1997-08-20 05:25:48 +00:00
Steve Passe
5996461961 Preperation for moving cpl into critical region access.
Several new fine-grained locks.
Control of new FAST_INTR() methods.
1997-08-20 05:22:33 +00:00
Philippe Charnier
15f3549108 Use CS_SECURE macro.
Reviewed by:	John Dyson
1997-08-18 06:58:59 +00:00
Steve Passe
75d23f5f87 Turn on the lockmanager by default for SMP.
Reviewed by:	"John S. Dyson" <toor@dyson.iquest.net>
1997-08-18 05:34:01 +00:00
Steve Passe
7e48002a92 Removed volatile from arg to simple_lock & friends. 1997-08-18 03:35:59 +00:00
Garrett Wollman
57bf258e3d Fix all areas of the system (or at least all those in LINT) to avoid storing
socket addresses in mbufs.  (Socket buffers are the one exception.)  A number
of kernel APIs needed to get fixed in order to make this happen.  Also,
fix three protocol families which kept PCBs in mbufs to not malloc them
instead.  Delete some old compatibility cruft while we're at it, and add
some new routines in the in_cksum family.
1997-08-16 19:16:27 +00:00
Steve Passe
b5cdece0a9 The promised "better fix" for "Trap 9 When Boot SMP" problem.
We now tsleep() in kthread_init() between start_init()
and prepare_usermode() while waiting for ALL the idle_loop()
processes to come online.

Debugged & tested by:   "Thomas D. Dean" <tomdean@ix.netcom.com>

Reviewed by:    David Greenman <dg@root.com>
1997-08-15 02:34:32 +00:00
Steve Passe
cb02d4da35 Cheap fix for kern/4255.
If the problem is seen this fix suggests a compile-time work-around then panics.
1997-08-10 19:32:38 +00:00
Steve Passe
7acc960834 Some fixes towards making "default configs" work again.
Still not fixed, no idea why.

Debug help from: "Thomas D. Dean" <tomdean@ix.netcom.com>
1997-08-09 23:01:03 +00:00
John Dyson
a62e455e42 A couple of missing doscmd header files. Messed up again. Now can
compile the kernel!!!
Submitted by:	Jonathan Lemon <jlemon@americantv.com>
1997-08-09 04:55:05 +00:00
John Dyson
48a09cf276 VM86 kernel support.
Work done by BSDI, Jonathan Lemon <jlemon@americantv.com>,
	Mike Smith <msmith@gsoft.com.au>, Sean Eric Fagan <sef@kithrup.com>,
	and probably alot of others.
Submitted by:	Jnathan Lemon <jlemon@americantv.com>
1997-08-09 00:04:06 +00:00
Søren Schmidt
a1af9248eb Yeah I'm back hacking syscons !!
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.
1997-08-08 22:52:30 +00:00