Commit Graph

1674 Commits

Author SHA1 Message Date
Nate Williams
3d989d58d8 Fix UserConfig w/syscons.
The 'getchar' function in syscons (sccngetc) is used by UserConfig to
get keyboard input from the user.  When it was modified to use the
shared keyboard port routines it used the port passed in during the
probe routine.  Since the probe routine was not yet called, the port was
set to 0, which is obviously not going to work.

Pre-initialize sc_port to IO_KBD which is really a kludge, but it's how
the previous driver did it's job.

Found by:	remote GDB
1996-11-19 17:08:10 +00:00
Bruce Evans
f020427513 Disabled i586-optimized copyin and copyout. They usually panic if the
user supplies a bad address, because they push a lot of stuff that the
fault handler doesn't know about onto the stack.  This has been broken
for more than half a year despite being tested for almost half a year
in -current.
1996-11-15 20:27:14 +00:00
Jordan K. Hubbard
9be435aa17 Break my own rule again - I didn't think this stuff was going to come back
with the copyright stuff fixed so soon (this should be merged into 2.2 when
you have a chance, Poul).

This is the new AWE32 driver, with support for the AWE32's fancy MIDI
synthesizer.  The utilities for this will appear as port submissions soon
afterwards, according to the submitter.

Submitted-By: Randall Hopper <rhh@ct.picker.com>
Written-By: Takashi Iwai <iwai@dragon.mm.t.u-tokyo.ac.jp>
1996-11-15 18:35:35 +00:00
Nate Williams
5fa39f9bde Disable mouse acceleration by default to be the same as the previous
driver.
1996-11-15 17:30:29 +00:00
Garrett Wollman
d4e29514fc Patches from driver author in PR#2010.
Submitter requests that this patch be merged into 2.2.

Submitted by:	seki@sysrap.cs.fujitsu.co.jp
1996-11-15 16:15:56 +00:00
Garrett Wollman
f283fbcac1 Fix RFC 1650 stats... should have read the doco more carefully.
Fixes PR#2011

Submitted by:  seki@sysrap.cs.fujitsu.co.jp
1996-11-15 16:07:03 +00:00
Søren Schmidt
73e0f79f04 Only poll the keyboard if the data left in the buffer is from the
kbd, not if its from the psm device.
1996-11-15 08:45:24 +00:00
Jordan K. Hubbard
3dc9f2bb59 Rename sb.h to sb_defs.h and pas.h to pas_defs.h so there's no
possibility of conflict with the versions in the compile dir.
1996-11-15 08:30:39 +00:00
Nate Williams
cf3328ad27 KNF'ify and fix boo-boo I made in last commit. 1996-11-15 06:17:36 +00:00
Nate Williams
9b8322ec09 Removed 2.1-compatability code and made the debugging less verbose by
default.
1996-11-15 05:41:34 +00:00
Nate Williams
8fcd7d6f5b New PS/2 mouse drive which uses the new 'shared' keyboard/psm read
routines.  An older version of this was tested successfully on all of my
systems with PS/2 mice.  This was brought in without testing because it
is necessary due to the previously committed syscons changes.

Submitted by:	Kazutaka Yokota <yokota@zodiac.mech.utsunomiya-u.ac.jp>
1996-11-15 05:30:52 +00:00
Søren Schmidt
6a90d9750d Finally a start at sharing the kdb controller routines between
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)
1996-11-14 22:19:17 +00:00
Satoshi Asami
7c219eac8f Some more updates.
wdreg.h: Delete wd_ctlr macro.  PC98 version of wd.c treats it as a
variable.

GENERIC98: Delete ep0 entry. Current ep driver write I/O port 0x100.
This clobbers ICW of i8259, because upper 8bits of address line is not
masked on mother board.

if_fe.c: Merge from revision 1.18 of sys/i386/isa/if_fe.c.

pc98.c: Globalize dmapageport, because SCSI driver use this
variable.

wd82371.c: Yet another merge.

These are 2.2 candidates.

Submitted by:	The FreeBSD(98) Development Team
1996-11-14 08:46:21 +00:00
Bruce Evans
750059bbc5 Don't fiddle with RTS if RTS flow control is off. This gives applications
almost complete control over RTS (control of its initial value is still
missing).

This fixes PR 1644 for sio.

The author of PR 1644 wants it in 2.1.6 and 2.2.  This may be safe since
the complications are only in rarely used cases that I hope I've covered.
1996-11-13 18:31:57 +00:00
Satoshi Asami
3c6350967c Another round of resync and some added sound support.
sys/pc98/i386/machdep.c: sync with i386/i386/machdep.c
sys/pc98/conf/options.pc98: sync with i386/conf/options.i386

sys/i386/isa/sound: DMA auto initialize mode support for PC98.
contributed by: Akio Morita <amorita@bird.scphys.kyoto-u.ac.jp>

Definite 2.2 material, I believe.

Submitted by:	The FreeBSD (98) Development Team
1996-11-13 02:00:17 +00:00
Søren Schmidt
65e925d16f 1. Avoid a race in scclose(). tty.c has kludges so that the race is
actually harmless.

2. Fixed code to match comment in scintr().

3. Don't allow even root to take control of the machine when securelevel > 0.
   I've secured the accesses to PSL_IOPL in all drivers and asked pst to
   review it, but he seems to be busy.  Write access to /dev/kmem and
   other critival devices currently leaks across raisings of securelevel
   via open fd's, so there may as well be a similar leak for PSL_IOPL.

4. (Most important.)  Don't corrupt memory beyond the screen buffers if
   the cursor happens to be off the 80x25 screen when syscons starts.

5. Fix console cursor update (not perfect yet).
Submitted by:   bruce
~
1996-11-11 22:21:03 +00:00
Nate Williams
6620cf7868 Removed 'XT_KEYBOARD' option from syscons. Document new-style way of
getting the same behavior using the flags, which can be done inside of
UserConfig.  (Also document other syscons flags which were previously
undocumented).

Requested by:	bde
1996-11-11 22:01:56 +00:00
Bruce Evans
1fe048505d Replaced I586_OPTIMIZED_BCOPY and I586_OPTIMIZED_BZERO with boot-time
negative-logic flags (flags 0x01 and 0x02 for npx0, defaulting to unset = on).
This changes the default from off to on.  The options have been in current
for several months with no problems reported.

Added a boot-time negative-logic flag for the old I5886_FAST_BCOPY option
which went away too soon (flag 0x04 for npx0, defaulting to unset = on).

Added a boot-time way to set the memory size (iosiz in config, iosize in
userconfig for npx0).

LINT:
Removed old options.  Documented npx0's flags and iosiz.

options.i386:
Removed old options.

identcpu.c:
Don't set the function pointers here.  Setting them has to be delayed
until after userconfig has had a chance to disable them and until after
a good npx0 has been detected.

machdep.c:
Use npx0's iosize instead of MAXMEM if it is nonzero.

support.s:
Added vectors and glue code for copyin() and copyout().
Fixed ifdefs for i586_bzero().
Added ifdefs for i586_bcopy().

npx.c:
Set the function pointers here.
Clear hw_float when an npx exists but is too broken to use.
Restored style from a year or three ago in npxattach().
1996-11-11 20:39:03 +00:00
Bruce Evans
f806e8f0f1 Fixed pessimized (short) i/o port type.
The change in if_epreg.h affects if_epreg.o and 3c5x9.o.

These changes are probably harmless, but I can't test them.
1996-11-11 17:11:08 +00:00
Bruce Evans
435b9481cd Fixed pessimized (short) i/o port types. 1996-11-11 16:32:43 +00:00
Bruce Evans
af01acf80b Fixed pessimized (short) i/o port type. 1996-11-11 15:57:40 +00:00
Nate Williams
a973755bfa Allow us to enable the 'XT_KEYBOARD' code using a configuration flag.
This allows the user to add modify syscons's configuration flags using
UserConfig that will allow older/quirky hardware (most notably older IBM
ThinkPad laptops) to work with the standard boot kernel.

Inspired by:	The Nomads
1996-11-10 16:44:13 +00:00
Bruce Evans
94ca32a3f5 Don't switch from fast interrupt handlers to normal interrupt
handlers if interrupts are nested more than a few (3) deep.  This
only reduces the maximum nesting level by 1 with the standard
drivers unless there is a related bug somewhere, but can't hurt
much (the worst case is returning to hoggish interrupt handler like
wdintr(), but such interrupt handlers hurt anyway).

Fixed a previously harmless race incrementing the interrupt nesting
level.

This should be in 2.1.6 and 2.2.
1996-11-07 03:05:27 +00:00
Bruce Evans
a01024e023 Count only hardware interrupts in cnt.v_intr, so that the individual
hardware interrupt counts add up to the total.  Previously, software
interrupts generated by splz() were counted in the total.  These
software interrupts seem to be very rare - there have apparently been
0 of them on freefall among the last 352448857 interrupts.
1996-11-06 17:02:38 +00:00
Søren Schmidt
10661203e7 Fix the hanging keyboard problem under Xaccel. Apprently we are loosing
an interrupt somewhere. The solution here is to check for keyboard
input each time the screen update timer ticks. Not pretty, but works.
1996-11-04 21:01:08 +00:00
Bruce Evans
fd25850c96 Don't clobber max_ncyls, ending up guessing thetotal number of cylinders as
the number in the 4th slot.

Fixes PR 1893.

Should be in 2.1.5 and 2.2.
1996-11-04 17:40:43 +00:00
Joerg Wunsch
bb6382fae2 Fix the broken EOF handling in the floppy driver. The most obvious
appearance of this bug was the malfunctioning -M option in GNU tar (it
worked only by explicitly specifying -L).

Reviewed by:	bde, and partially corrected accoring to his comments

Candidate for 2.2, IMHO even for 2.1.6.
1996-11-02 23:31:11 +00:00
Joerg Wunsch
4441bd4c1b Avoid touching the LEDs too early in the game. After the recent
changes to the keyboard code in pcvt, this update_led() very often
caused pcvt to hang early at boot time.

(Eventually, a better solution should be found, but the simple
omission serves well as a workaround for something that is actually a
show-stopper class problem.)

Candidate for 2.2.
1996-11-02 23:28:06 +00:00
Satoshi Asami
ce8ba0cdf6 The last update/merge of PC98 stuff before 2.2. The whole
pc98/pc98/sound directory has vanished now!

Submitted by:	FreeBSD(98) Development Team
1996-11-02 10:41:28 +00:00
Paul Traina
39daae723d add in CONSPEED option which controls console serial port speed 1996-11-02 02:26:06 +00:00
John Hay
75c66a120a if_sr.c corrupted the global variable `ticks'.
Cosmetic changes:
if_sr_.c won't compile with a K&R compiler, so there is no need to cast
the timeout arg to the (wrong) type.
Submitted by:	bde
1996-10-31 20:22:40 +00:00
Satoshi Asami
e30f001135 More merge and update.
(1) deleted #if 0

    pc98/pc98/mse.c

(2) hold per-unit I/O ports in ed_softc

    pc98/pc98/if_ed.c
    pc98/pc98/if_ed98.h

(3) merge more files by segregating changes into headers.

  new file (moved from pc98/pc98):

    i386/isa/aic_98.h

  deleted:

    well, it's already in the commit message so I won't repeat the
    long list here ;)

Submitted by:	The FreeBSD(98) Development Team
1996-10-30 22:41:46 +00:00
Poul-Henning Kamp
0cf34a4a5f Pass right arp to bpf_mtap(). 1996-10-30 08:50:26 +00:00
Satoshi Asami
4d2d765487 Another round of merge/updates.
(1) Add #ifdef PC98:

	sys/pc98/boot/biosboot/boot2.S

 (2) Fix bug that made it impossible to boot from sd's other than unit 0:
	sys/pc98/boot/biosboot/sys.c

 (3) Delete redundant $Id$:

	sys/pc98/pc98/clock.c (reject$B$5$l$k$+$b$7$l$J$$(B)

 (4) unt -> u_int:
	sys/pc98/pc98/if_ed.c

 (5) Add support for rebooting by the hot-key sequence:

	sys/pc98/pc98/kbdtables.h

 (6) Display now looks like PC/AT version:

	sys/pc98/pc98/npx.c

 (7) Change comment to match that of PC/AT version:

	sys/pc98/pc98/pc98.c

 (8) Add function prototypes:

	sys/pc98/pc98/pc98_machdep.c

 (9) Include PC98 headers:

	sys/pc98/pc98/sound/adlib_card.c
	sys/pc98/pc98/sound/audio.c
	sys/pc98/pc98/sound/dev_table.c
	sys/pc98/pc98/sound/dmabuf.c
	sys/pc98/pc98/sound/midi_synth.c
	sys/pc98/pc98/sound/midibuf.c
	sys/pc98/pc98/sound/opl3.c
	sys/pc98/pc98/sound/oatmgr.c
	sys/pc98/pc98/sound/sb16_dsp.c
	sys/pc98/pc98/sound/sb16_midi.c
	sys/pc98/pc98/sound/sb_card.c
	sys/pc98/pc98/sound/sb_dsp.c
	sys/pc98/pc98/sound/sb_midi.c
	sys/pc98/pc98/sound/sb_mixer.c
	sys/pc98/pc98/sound/sequencer.c
	sys/pc98/pc98/sound/sound_config.h
	sys/pc98/pc98/sound/sound_switch.c
	sys/pc98/pc98/sound/soundcard.c
	sys/pc98/pc98/sound/sys_timer.c

(10) Merge in PC98 changes:

	sys/i386/isa/sound/os.h

(11) Deleted as result of 9. and 10. above:

	sys/pc98/pc98/sound/ad1848_mixer.h
	sys/pc98/pc98/sound/aedsp16.c
	sys/pc98/pc98/sound/coproc.h
	sys/pc98/pc98/sound/finetune.h
	sys/pc98/pc98/sound/gus_hw.h
	sys/pc98/pc98/sound/gus_linearvol.h
	sys/pc98/pc98/sound/hex2hex.h
	sys/pc98/pc98/sound/mad16.h
	sys/pc98/pc98/sound/midi_ctrl.h
	sys/pc98/pc98/sound/midi_synth.h
	sys/pc98/pc98/sound/opl3.h
	sys/pc98/pc98/sound/os.h
	sys/pc98/pc98/sound/pas.h
	sys/pc98/pc98/sound/sb_mixer.h
	sys/pc98/pc98/sound/soundvers.h
	sys/pc98/pc98/sound/tuning.h

Submitted by:	The FreeBSD(98) Development Team
1996-10-29 08:37:02 +00:00
John Hay
ebcdcb982a Add support for the SDL RISCom N2pci cards. Bring in the enhancements
made to the Arnet driver.
1996-10-29 03:53:21 +00:00
John Hay
c2b3cc824d Remove some unnecessary code in the interrupt handler.
Check that a received packet isn't longer than MCLBYTES. This will
sometimes happen if a cable is plugged into or removed from a live
system.
Try to cater better for early receive interrupts.
1996-10-28 19:40:01 +00:00
John Hay
21b4a6992c A #define really don't need a ; at the end. 1996-10-28 19:35:37 +00:00
Søren Schmidt
66e7fce7ac Use the calibrated/adjustable i8254 frequency `timer_freq' instead of
TIMER_FREQ.

Fixed missing splx() in scrn_timer().  The bug was harmless because of the
undocumented behaviour that the ipl is automatically restored for timeout
functions (see softclock()).  Perhaps we should depend on this behaviour.

Fixed the ddb fix in rev.1.176.  The in_debugger flag was no use because
it only works when the debugger is entered via the keyboard hotkey.  The
debugger may be entered for breakpoints and traps, and the console putc
routine has no way of knowing when it was, so the console putc routine
must (almost?) always remove the cursor image.

Not fixed: console switching in ddb doesn't work (ISTR it working), and
console 0 shouldn't be switched to for the debugger hotkey unless console
0 is /dev/console.

Fixed side effects from calling add_keyboard_randomness() in the console
getc routine by not calling it.  add_keyboard_randomness() currently
always reenables interrupts on 386's and 486's.  This is very bad if the
console getc routine is called from the debugger and the debugger was
entered with interrupts disabled.

Fixed preservation of initial screen and now-bogus comment about it.  It
was broken by setting the initial scr_buf to `buffer' instead of Crtat.
`buffer' was full of nulls and the first scroll cleared everything above
the things written through syscons.

Submitted by:	bruce (bde@freebsd.org)
1996-10-26 20:16:58 +00:00
Bruce Evans
9272350657 Removed initialization of a variable that went away. Oops. 1996-10-26 00:11:57 +00:00
Bruce Evans
9ef7d39520 Removed unused #includes.
Strength-reduced used #include.

Staticized pcaintr().

Fixed some style bugs.
1996-10-25 16:09:31 +00:00
Bruce Evans
9275c7cc3e Use macros from timmerreg.h instead of private ones.
Use global timer_freq instead of private TIMER_CLK.

Removed unused #includes.

Fixed some comments.
1996-10-25 14:00:47 +00:00
Bruce Evans
2d872b777d Print the clock calibration messages all on one (long) line again so
that they are easy to grep for.

Removed now-unused i586 counter variables.

Fixed some style bugs.
1996-10-25 13:46:21 +00:00
Paul Traina
dcb21864dc Remove SC_KBD_PROBE_WORKS option and replace it with a simple run-time flag
bit (0x0008) in the sc driver configuration line.  This way it's easy to
boink a generic kernel.

Also, document and place in an opt_ file the #define's for overriding which
serial port is the system console.
Approved by:	sos
1996-10-23 07:29:44 +00:00
Søren Schmidt
c070783c4b Changed mouse functionality a bit, now the pointer disappears if
there is keyboard input.
The mousepointer is shown again immediately if moved.

Also a function pointer used to install a userwritten extra
ioctl handler (sc_user_ioctl). This way its is possible to
install user defined videomodes etc etc. No further changes
should be in the kernel.
1996-10-18 18:51:37 +00:00
Poul-Henning Kamp
81acf468e2 DKFL_MULTI lives in flags, not in status. 1996-10-17 21:18:42 +00:00
Bruce Evans
d6b9e17eb5 Improved non-statistical (GUPROF) profiling:
- use a more accurate and more efficient method of compensating for
  overheads.  The old method counted too much time against leaf
  functions.
- normally use the Pentium timestamp counter if available.
  On Pentiums, the times are now accurate to within a couple of cpu
  clock cycles per function call in the (unlikely) event that there
  are no cache misses in or caused by the profiling code.
- optionally use an arbitrary Pentium event counter if available.
- optionally regress to using the i8254 counter.
- scaled the i8254 counter by a factor of 128.  Now the i8254 counters
  overflow slightly faster than the TSC counters for a 150MHz Pentium :-)
  (after about 16 seconds).  This is to avoid fractional overheads.

files.i386:
permon.c temporarily has to be classified as a profiling-routine
because a couple of functions in it may be called from profiling code.

options.i386:
- I586_CTR_GUPROF is currently unused (oops).
- I586_PMC_GUPROF should be something like 0x70000 to enable (but not
  use unless prof_machdep.c is changed) support for Pentium event
  counters.  7 is a control mode and the counter number 0 is somewhere
  in the 0000 bits (see perfmon.h for the encoding).

profile.h:
- added declarations.
- cleaned up separation of user mode declarations.

prof_machdep.c:
Mostly clock-select changes.  The default clock can be changed by
editing kmem.  There should be a sysctl for this.

subr_prof.c:
- added copyright.
- calibrate overheads for the new method.
- documented new method.
- fixed races and and machine dependencies in start/stop code.

mcount.c:
Use the new overhead compensation method.

gmon.h:
- changed GPROF4 counter type from unsigned to int.  Oops, this should
  be machine-dependent and/or int32_t.
- reorganized overhead counters.

Submitted by:	Pentium event counter changes mostly by wollman
1996-10-17 19:32:31 +00:00
Nate Williams
b4c9d8eaf5 This patch attempts to make the pccard probe in if_ed.c work with
non-memory-mapped cards.

Submitted by:	Michael Smith <msmith@atrad.adelaide.edu.au>
Reviewed by:	phk,dg
1996-10-17 13:42:13 +00:00
Søren Schmidt
b5ca878577 Corrected the setting of winsize on open().
Problem pointed out by David Nugent - davidn@blaze.net.au.
1996-10-15 20:27:07 +00:00
Bruce Evans
62c3734cbe Updated #includes to 4.4lite style. 1996-10-15 19:22:46 +00:00
Bruce Evans
64a88efa64 Fixed setting of the keyboard LEDs. For some keyboards and/or keyboard
controllers, it is an error to issue a command before the keyboard
has had time to reply to the previous command.  Setting the LEDs
involves issueing 2 commands, so it never worked on these keyboards.

Fixed resetting of keyboard.  It is possible for unprocessed
scancodes to be present when the reset routine is called.  This
usually occurs after switching from one console driver to another
in userconfig.  pcvt and syscons attempt to flush any stale scancodes,
but sometimes fail to do so because keyboard and/or keyboard
controller takes a long time to send the scancodes after reset
(scancodes are apparently not flushed by reset!).  syscons handles
this later by not checking for errors at strategic places, but pcvt
was confused.

Use an impossible initial and failure mode setting for the LEDs
so that the LEDs always get set if they are possibly out of sync.

Added missing spltty() in update_led().
1996-10-14 21:44:05 +00:00
David Greenman
a309908dc3 Fixed a bug that got introduced when I changed the CY16_RESET and
CY_CLEAR_INTR definitions. This might have affected probing of ISA
versions of the Cyclom 16/32-Y.
1996-10-14 16:43:11 +00:00
David Greenman
6fd560f670 Make this compile again for the CyDebug case. 1996-10-14 16:10:00 +00:00
Poul-Henning Kamp
6704a50967 Stop using old compatibility names from buf.h 1996-10-13 14:36:06 +00:00
David Greenman
7a28c2a8cd Change DEVFS device naming convention for cuac*, ttyc*. 1996-10-13 01:30:32 +00:00
David Greenman
3010cd6550 Changes to add support for the PCI version of the Cyclades Cyclom-Y
serial adapter, and support for multiple Cyclom controllers.
1996-10-13 01:09:24 +00:00
Garrett Wollman
f5b7ed3e67 Implement the RFC 1650 MIB. 1996-10-11 15:19:23 +00:00
Satoshi Asami
dffcea8d5f Another round of updates. Highlights:
(1) Merged i386/i386/sb.h, deleted pc98/pc98/sb.h.

(2) pc98/conf/GENERIC8 looks more like i386/conf/GENERIC now.

(3) Fixed display bug in pc98/boot/biosboot/io.c.

(4) Prepare to merge memory allocation routines:

	pc98/i386/locore.s
	pc98/i386/machdep.c
	pc98/pc98/pc98_machdep.c
	pc98/pc98/pc98_machdep.h

(5) Support new board "C-NET(98)":

	pc98/pc98/if_ed98.h
	pc98/pc98/if_ed.c

(6) Make sure FPU is recognized for non-Intel CPUs:

	pc98/pc98/npx.c

(7) Do not expect bss to be zero-allocated:

	pc98/pc98/pc98.c

Submitted by:	The FreeBSD(98) Development Team
1996-10-09 21:47:16 +00:00
Bruce Evans
c20b324bb6 Put I*86_CPU defines in opt_cpu.h. 1996-10-09 19:47:44 +00:00
Bruce Evans
14f3567a32 Don't claim the console when the driver is disabled. The getc/putc
part of the console driver usually works when the driver is disabled,
but the normal read/write part doesn't (it caused a panic).
1996-10-09 15:24:21 +00:00
Bruce Evans
e8e87818d1 Fixed pessimized (short) i/o port types. 1996-10-08 21:08:18 +00:00
Garrett Wollman
545c48b83a Fix padding of short packets (PR#1701).
Submitted by: seki@sysrap.cs.fujitsu.co.jp
1996-10-07 17:50:00 +00:00
Justin T. Gibbs
0a42ab8379 Advanced Systems Inc. SCSI Controller driver and ISA/VL front end.
I have only tested the ABP5140 card and only with a single CDROM drive
but it seems to work fine.  This driver relies on features found only in
the SCSI branch so will not work in -current until those changes
are brought in.  It also doesn't have any error handling code *yet*.
The goal is to use this driver as the development platform for the new
generic SCSI layer error recovery/handling code.

PCI and EISA front ends will show up as soon as I get my hands on
the cards.  There are also a few issues in the driver that I need
to clear up with AdvanSys before I can suggest sticking one of
these cards in your server. 8-)

Thanks to AdvanSys for releasing this code under a suitable copyright.

Obtained from:  Ported from the Linux driver writen by
		bobf@advansys.com (Bob Frey).
1996-10-07 02:07:07 +00:00
David Greenman
d41fe60984 Oops, missed a chunk in that last commit. 1996-10-04 14:17:32 +00:00
David Greenman
1c41fd74b9 Implemented a more sophisticated mechanism for finding the chip iobase
so that 32Y boards will work.
Fixed bogus indenting and added a pair of parens.
1996-10-04 10:33:13 +00:00
Jordan K. Hubbard
0c8c5f852a scresume erroneously used before declared. Move the function
rather than add another APM ifdef just for the forward decl.
[Boy, sure a lot of warnings in here!]
1996-10-03 00:42:27 +00:00
Søren Schmidt
4a8aeffeb2 Fixed the userconfig problem (and one with ddb as well).
The rudimentary support for a splash page is there, and works, it
just needs a splash page...
1996-10-02 22:00:38 +00:00
Søren Schmidt
d58801b2ee Fixed the "missing updates" reported by ache.
Moved a little closer to having a splash page capability.
1996-10-01 23:24:09 +00:00
Jordan K. Hubbard
10dce6c9f3 #ifdef another instance of toggle_splash_screen() which Soren missed. 1996-10-01 07:38:14 +00:00
Søren Schmidt
ebe3b2aabd Dont make splash screen the default :) 1996-09-30 23:10:35 +00:00
Søren Schmidt
a221620c79 Fix a couble of nasties regarding mouse pointer and different
resolutions.
Allow middle mouse button to be used for pasting.
Also added the beginnings of support for a splash page.
1996-09-30 23:00:58 +00:00
Bruce Evans
92d0aa20dc Work around UMC8669F and Startech UART bugs by not writing to the
divisor latch registers if the registers wouldn't change.

Use the default console cfcr setting while setting the divisor
latch registers for console i/o.  Input may be messed up by
transiently changing the cfcr.

Use a usual cfcr setting while setting the divisor latch registers
in the probe.  This shouldn't matter, but this is not the place to
test the UART's handling of 5 bit words.

Removed a stale devfs comment.
1996-09-30 12:22:27 +00:00
Peter Wemm
ed82824ef8 Some warning cleanups. There were some needless casts that also caused
gcc -Wcast-qual to scream.  There's still quite a few left, but since I'm
cleaning out my tree, I'll commit these now.
1996-09-27 13:50:59 +00:00
Peter Wemm
983febf3dc I've been meaning to commit this for months. Implement select()
for /dev/random and /dev/urandom.  Both are always writable, urandom is
always readable, and /dev/random is readable when >= 8 bits are in the
pool.
1996-09-27 13:25:13 +00:00
Bruce Evans
ebedb5ad97 Cleaned up all headers that include <sys/ioctl.h> or <sys/ioccom.h>:
- 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.
1996-09-21 14:59:43 +00:00
Bruce Evans
83f52dabab Include <sys/filio.h> explicitly - don't depend on <machine/soundcard.h>
bogusly defining non-soundcard ioctls.
1996-09-21 14:53:28 +00:00
Bruce Evans
253c0899b2 Don't include <sys/conf.h> for the kernel in disk-related headers.
It is needed for implementation details but very little of it is
needed for the interface.  Include it in the few places that didn't
already include it.

Include <sys/ioccom.h> in <sys/disklabel.h> (as already in
<sys/diskslice.h>) so that all the disk-related headers are almost
self-sufficient.
1996-09-20 17:39:44 +00:00
Bruce Evans
831031ce00 Attached simple external ddb commands show rtc', show pgrpdump'
and `show cbstat'.  The pgrpdump code was previously controlled by
`#ifdef DEBUG'.
1996-09-14 10:53:48 +00:00
Bruce Evans
4fab2f9bc7 Changed cncheckc() interface so that it is 8-bit clean - return -1
instead of 0 if there is no input.

pcvt_drv.c:
Partially fixed pccncheckc().  It returned a boolean value instead of
the character that it fetches from the input fifo (if any).  I think
it still discards characters after the first for multi-char input.
1996-09-14 04:30:32 +00:00
Bruce Evans
daed6ffd24 Changed cncheckc() interface so that it is 8-bit clean - return -1
instead of 0 if there is no input.

syscons.c:
Added missing spl locking in sccncheckc().  Return the same value as
sccngetc() would.  It is wrong for sccngetc() to return non-ASCII, but
stripping the non-ASCII bits doesn't help.
1996-09-14 04:27:46 +00:00
Bruce Evans
8b3fb3e16d Removed another devconf leftover. A fat devconf support function was
still being used just to support printing of the device name in the
probe.  Restored the method used in rev.1.6 and changed it to print
the same strings as the previous revision.

Reviewed by:	Paul Richards
1996-09-14 01:26:16 +00:00
Bruce Evans
5a175c1c5d Don't compile a 256-byte unused table in the pca driver.
The other 256-byte table in ulaw.h still gets duplicated if both
pca and snd are configured.
1996-09-13 06:29:30 +00:00
Satoshi Asami
0e408c25a1 Another round of merge/update.
(1) Add PC98 support to apm_bios.h and ns16550.h, remove pc98/pc98/ic
(2) Move PC98 specific code out of cpufunc.h (to pc98.h)
(3) Let the boot subtrees look more alike

Submitted by:	The FreeBSD(98) Development Team
		<freebsd98-hackers@jp.freebsd.org>
1996-09-12 11:12:18 +00:00
Nate Williams
aa5167c963 Fixed so that the card will go into promiscuous mode for BPF.
Submitted by:	Bill Kish <kish@osf.org>
1996-09-11 16:11:21 +00:00
Bruce Evans
b568ea4e01 Removed more devconf leftovers. 1996-09-10 23:31:13 +00:00
Peter Wemm
9545a0eaa4 Hack workaround XFree86 switching failure when used with /dev/sysmouse
and xdm, possibly in general.

What was happening was that the server was doing a tcsetattr(.. TCSADRAIN)
on the mouse fd after a write.  Since /dev/sysmouse had a null t_oproc,
the drain failed with EIO.  Somehow this spammed XFree86 (!@&^#%*& binary
release!!), and the driver was left in a bogus state (ie: switch_in_progress
permanently TRUE).

The simplest way out was to implement a dummy scmousestart() routine to
accept any characters from the tty system and toss them into the void.

It would probably be more correct to intercept scwrite()'s to the mouse
device, but that's executed for every single write to the screen.
Supplying a start routine to eat the characters is only executed for the
mouse port during startup/shutdown, so it should be faster.
1996-09-10 19:14:49 +00:00
Bruce Evans
80f495ec7e Backed out last change. It depends on the future change of adding
-I- to CFLAGS.  <sb.h> must currently be used to give the version
of sb.h in the current directory, while "sb.h" in the buggy version
gave the (wrong) version in the source directory.  Searching in the
source directory first is normal, but is the reverse of the order
suggested by the 4.4Lite2 #include style.  -I- will remove the
ambiguities.
1996-09-10 19:09:12 +00:00
Bruce Evans
f313170d3c Updated #includes to 4.4Lite style. 1996-09-10 08:32:01 +00:00
Søren Schmidt
b1538b1658 The poor nsccons variable was gone agian this time hidden by
an ifdef , wonder who broke it this time :)

Submitted by:	 ache
1996-09-09 19:02:26 +00:00
Søren Schmidt
47382cd1e0 Make syscons replicate a mousesystems mouse on minor 128..
This enables other consumers of the mouse, to get it info via
moused/syscons.
In order to use it run moused (from sysconfig), and then tell
your Xserver that it should use /dev/sysmouse (mknod sysmouse c 12 128)
and it a mousesystems mouse. Everybody will be happy then :)
Remember that moused still needs to know what kind of mouse you
have..

Comments welcome, as is test results...
1996-09-08 21:31:56 +00:00
Poul-Henning Kamp
40f3771f7f Various cleanups for remanents of devconf. 1996-09-08 10:44:18 +00:00
Søren Schmidt
fa630ea6eb Fixed another little both in the devconf removal. 1996-09-08 10:28:23 +00:00
Jordan K. Hubbard
885e672626 Finish what phk started here in removing devconf. The ATAPI_STATIC case
was still broken, as was the normal case since atapi_attach() was called
internally.
1996-09-08 01:31:27 +00:00
Bruce Evans
a7265255cc Fixed another easy case of const poisoning in the kernel. Cosmetic.
(A pointer to a const was misused to avoid loading loading the same
value twice, but gcc does exactly the same optimization automatically.
It can see that the value hasn't changed.)
1996-09-07 21:47:53 +00:00
Nate Williams
8d250e2915 Disable 'suspend' as it tends to lockup computers with the current APM
driver.
1996-09-07 17:52:56 +00:00
Satoshi Asami
c9da8434ea Yet another merge. Remove support.s by deleting memcopy. Remove
autoconf.c by merging icu.h.  Fix a couple of typos.

Submitted by:	The FreeBSD(98) Development Team.
1996-09-07 02:14:47 +00:00
Paul Traina
53809eab9c Add option SC_KBD_PROBE_WORKS to syscons driver.
If you define this, it means your keyboard is actually probable using the
brain-dammaged probe routine in syscons, and if the keyboard is NOT found,
then you don't want syscons to activate itself further.

This makes life sane for those of us who use serial consoles most of the
time and want "the right thing" to happen when we plug a keyboard in.
1996-09-06 23:35:54 +00:00
Paul Traina
c52fcce8a5 Bannish ATAPI and ATAPI_STATIC #defines to opt_atapi.h. 1996-09-06 23:32:55 +00:00
Poul-Henning Kamp
bfbb029d87 Remove devconf, it never grew up to be of any use. 1996-09-06 23:09:20 +00:00
Søren Schmidt
c771590aa7 Fixed a panic when switching to 40x25 mode, and cursor was beyond the
new buffer.
1996-09-04 22:24:19 +00:00
Satoshi Asami
30cb1d45ae More merge.
(1) Remove mk30line (moved to /usr/sbin, but not in our source tree yet)

(2) Delete unneeded (well, harmful now :) code to prohibit #including
    of isa_device.h from PC98 sources.

(3) Remove files now equal to their ISA/PC-AT counterparts.

Submitted by:	The FreeBSD(98) Development Team
1996-09-04 09:52:31 +00:00
Søren Schmidt
3b1a310b4b Fixed a couple of bugs in the mousepointer code.
Changed update strategy slightly.
Make set_mode & copy_font externally visible.
1996-09-01 18:16:06 +00:00
Bruce Evans
09a8dfa260 Don't depend in the kernel on the gcc feature of doing arithmetic on
pointers of type `void *'.  Warn about this in future.
1996-08-31 14:48:13 +00:00
Bruce Evans
3a4c46bd22 Fixed restoral of nsscons variable. The tty for /dev/console was lost.
A warning was introduced.
1996-08-28 18:20:22 +00:00
Peter Wemm
3bd9f6db7a Unconditionally null-terminate string read into spkr driver.
Submitted by: Ikuo Nakagawa <ikuo@isl.intec.co.jp>, PR#1488, but using
	Bruce Evans <bde@zeta.org.au>'s fix.
1996-08-24 03:24:39 +00:00
John Dyson
4acf48dabc Another attempt at making multi-sector mode work. 1996-08-23 02:52:44 +00:00
Peter Wemm
cb70011ceb restore nsccons variable from rev 1.115 that was deleted in rev 1.136
during phk's staticize/cleanup commits.  pstat needs it, the MAXCONS
option is not visible anywhere else, and pstat uses it to find the bounds
of the sccons[MAXCONS] array, which varies.
1996-08-16 10:16:32 +00:00
Joerg Wunsch
3f0aecd3b5 Fix two minor oddities introduced by my yesterday's patches:
. preserve a multi-char sequence in a small static buffer inside
  pccngetc(), so it won't be clobbered later (used to happen when
  breaking into DDB user Ctrl-Alt-ESC), and

. simplify the ``keystroke is present'' determination in sgetc(), thus
  making pccncheck() actually working without waiting for a keystroke.
1996-08-12 21:31:07 +00:00
Peter Wemm
08424dfaa3 Extend the poll code so that it can periodically scan the host cards
for work regardless of whether there was an interrupt.  This needs more
work, it should be able to run better when there are more than 3 host
cards present, ie: all cards in polling-only mode with no IRQ.  (The
host cards have a choice of 3 irq's, 11, 12, or 15, or just polling)
1996-08-12 17:12:07 +00:00
Bill Paul
89e85b2828 Apply my small patch to make detection of ATAPI CD-ROMs happen a
little more reliably. So far I've received a couple of positive
responses and no objections to these changes.

There are two one-line changes:

- In wdprobe(), when testing the error status of drives, don't
  unconditionally decide that there is no controller present if we
  read back a value of 0x81 (drive 0 okay, drive 1 failed) twice
  in a row. This may be caused by having an ATAPI CD-ROM jumpered
  as a master on the controller with no slave.

- In wdgetctlr(), when checking for a status of WDCS_READY, check the
  value twice. The first time may be bogus. This stops a phantom wd2
  device from being detected when an ATAPI CD-ROM is attached to the
  secondary controller alone as a slave. (This can cause installation to
  fail when sysinstall attempts to open the phantom device and wedges the
  system as a result. This has bitten me a couple of times on some
  Gateway 2000 machines.)
1996-08-12 00:53:02 +00:00
Joerg Wunsch
fae988778b Fix many long-standing bugs and problems with pcvt, namely:
. make pccncheck() work even when interrupts are disabled, so the
  ``Press a key on the console...'' procedure will work,
. make kernel colors #ifndef, so they can be overridden from the
  config file,
. use shutdown_nice() instead of cpu_reset() if Ctrl-Alt-Del is
  enabled,
. allow pccngetc() to return more than a single character, so the
  arrow keys will work (and thus visual UserConfig!),
. fix a warning.

This closes all know PRs related to pcvt, in particular #845, #1236,
and #1265.  PR #991 is a duplicate for 845, and PR #1283 has already
been fixed earlier in rev 1.11 of pcvt_conf.h.

Submitted by:	Ulf Kieber (kieber@sax.de), for the kernel color fix
1996-08-10 22:14:36 +00:00
David Greenman
aea6ddfd4f This diff adds support for the HP PC Lan+ cards (model numbers: 27247B
and 27252A) in FreeBSD's `ed' driver.

Submitted by:	A JOSEPH KOSHY <koshy@india.hp.com>
1996-08-07 11:18:23 +00:00
Poul-Henning Kamp
26a8b0bf7e Megacommit to straigthen out ETHER_ mess.
I'm pretty convinced after looking at this that the majority of our
drivers are confused about the in/exclusion of ETHER_CRC_LEN :-(
1996-08-06 21:14:36 +00:00
Poul-Henning Kamp
218e61c915 Remove a spurious message. 1996-08-04 20:04:57 +00:00
Poul-Henning Kamp
c2069b2c84 Reduce reset timeout. "only" 16 seconds (!) for a 512K board. 1996-08-04 20:04:11 +00:00
Poul-Henning Kamp
78a5a8f486 Update driver.
Obtained from: NetBSD
1996-08-04 10:58:17 +00:00
Poul-Henning Kamp
ab2460e4a6 Replace about 60 lines of code with a call to ether_ioctl().
This can be done for most of our ethernet drivers.
1996-08-04 10:57:29 +00:00
Peter Wemm
78ee1461b7 make si.c compile in kernels without COMPAT_43. 1996-08-03 00:21:44 +00:00
Bruce Evans
70e53371c4 Eliminated i586_ctr_rate. Use i586_ctr_freq instead. 1996-08-02 21:16:27 +00:00
Nate Williams
992eae3421 When I hit [Ctrl]+8, appeared 9 instead of 8. It may not be critical but
surprised me. ;-)

Submitted by:	tacha@tera.fukui-med.ac.jp <Tatoku Ogaito>
Obtained from:	NetBSD/GNATS
1996-08-01 22:38:30 +00:00
Bruce Evans
98a51b2b94 Synced with sio.c: added support for TIOCDCDTIMESTAMP and simplified
timestamp code.
1996-07-30 19:50:37 +00:00
Bruce Evans
33ded19fc2 Fixed the machdep.i8254_freq and machdep.i586_freq sysctls. Writes were
handled bogusly.

Centralized the setting of all the frequency variables.  Set these
variables atomically.  Some new ones aren't used yet.
1996-07-30 19:26:55 +00:00
Andrey A. Chernov
58db4b5a8f Fix GIO_ATTR ioctl return to match SYSV 1996-07-30 15:20:08 +00:00
John Dyson
adef72483b Move a couple of the initialization commands to the right place. Multi
sector mode was not getting re-initialized when needed.
1996-07-27 19:01:10 +00:00
Atsushi Murai
826702b23d Under the heavy load for transmiting condition, it will be write error
and then never accept for sending packet from upper layer anymore
(i.e. ping -f )
Reviewed by:	David Greenman <dg@root.com>
Submitted by:	amurai@spec.co.jp
1996-07-27 12:40:31 +00:00
Peter Wemm
66b8e416e6 ttysleep() can return EWOULDBLOCK, not ETIMEDOUT as the comment in tty.c
suggests.

Pointed out by: bde
1996-07-26 16:55:37 +00:00
Peter Wemm
446fe15067 Apply a bandaid to a problem elsewhere in the driver, when the process is
blocked in a write() while waiting for the output to drain, sleep only
for tp->t_timeout, not forever.  This only seems to happen when there is
either a modem lockup holding the hardware flow control down, or due to
some problem in the driver with processes attempting to write after the
modem has hung up (eg: elm, tf).
1996-07-26 13:47:38 +00:00
Poul-Henning Kamp
fe1624a4ff Revert my bdevsw change for wcd.c, Bruce pointed out that
this driver has bogus open/close entries.
1996-07-24 13:35:34 +00:00
Poul-Henning Kamp
cba8a5ddd3 Make a "DWIM" function for adding [bc]devsw entries for bdev drivers.
Saves about 280 butes of source per driver, 56 bytes in object size
and another 56 bytes moves from data to bss.

No functional change intended nor expected.

GENERIC should be about one k smaller now :-)
1996-07-23 21:52:43 +00:00
Poul-Henning Kamp
7c60604ada Add yet another kludge to this driver. Man page update to follow. 1996-07-21 09:28:50 +00:00
Joerg Wunsch
3135240845 Post-commit review by Bruce. Mostly stylistic changes.
Submitted by:	bde
1996-07-21 08:20:51 +00:00
Joerg Wunsch
5eb14f7e7c Replace the annoying calls to Debugger() by panic()'s in the
#ifdef DIAGNOSTIC case, and a warning only otherwise.

People who want them to break into the debugger can always set the
breakpoint explicitly.  The existing behaviour was a misfeature from
the beginning, in the (wrong) assumption that the SCSI controller must
always be of essential importance to the entire system.
1996-07-20 22:02:44 +00:00
Joerg Wunsch
f4de22acc7 Correct the timer2 acquiration and release, it must happen at splclock.
Also slightly reformatted so that it meets at least partially style(9),
and makes navigating through the functions easier.
1996-07-20 18:48:54 +00:00
Joerg Wunsch
99211adf2c Major cleanup of the timerX_{acquire,release} stuff. In particular,
make it more intelligible, improve the partially bogus locking, and
allow for a ``quick re-acquiration'' from a pending release of timer 0
that happened ``recently'', so it was not processed yet by clkintr().
This latter modification now finally allows to play XBoing over
pcaudio without losing sounds or getting complaints. ;-)  (XBoing
opens/writes/closes the sound device all over the day.)

Correct locking for sysbeep().

Extensively (:-) reviewed by:	bde
1996-07-20 18:47:23 +00:00
Stefan Eßer
76af5a923c Last night (local time :) I accidently checked in an intermediate version
of this patch, which had not actually been reviewed by Joerg or Paul!
(I'll better stop committing files after midnight ...)

I'm now commiting the latest code, which has been reported to work.

Minor correction to the previous commit message for this file:
The first PCI Lance in a system will get a name of lnc1, the second
will be known as lnc2 and so on. An arbitrary number of cards is
supported in a system ...
1996-07-19 17:18:20 +00:00
Atsushi Murai
0ed091876d Add interrupt register set up with original register value
before attaching. Without this fix, 3c579(EISA) never make
any H/W inturrupt.
Reviewed by:	"Justin T. Gibbs" <gibbs@freefall.freebsd.org>, nao@sbl.cl.nec.co.jp and owner-current on mailing list ;-)
Submitted by:	amurai@spec.co.jp, nao@sbl.cl.nec.co.jp
1996-07-19 13:20:05 +00:00
Stefan Eßer
c268c94f6b FINALLY: PCI support for the Lance Ethernet driver.
This code applies to several systems with integrated Ethernet
chip, for example from HP or Compaq. It should also support
PCI Ethernet cards based on the AMD PCI Lance chip.

This code has been reviewed (visually) by Paul Richards and
tested (using an ISA Lance board) by Joerg Wunsch.
Since the parameters to nearly each and every single function
had to be changed (generally from unit number to lnc_soft*),
there is some potential for buglets having crept in ...

BEWARE: If you had lnc0 configured to have the ISA probe find
your PCI Lance, then it should now be found by the PCI probe,
and should be automatically configured as pci1 (!!! note the "1").

Reviewed by:	paul, joerg
1996-07-18 22:03:47 +00:00
Julian Elischer
75d050aeaa some internal modems need LOTS of time to generate an interrupt
on demand.. increase DELAY from 1000 uS to 10000uS
1996-07-17 22:07:23 +00:00
Joerg Wunsch
cb9bf21103 Introduce two /dev/audio compat alias names for flushing and draining
the pcaudio device.  Now, XBoing sounds much better...
1996-07-17 20:18:56 +00:00
Bruce Evans
65d98215ea Fixed adjustment of `time' when timer0 is released. 27465 was 27645 in
a comment and in code that was only used when pcaudio was closed.  The
maximum error was 66 usec.
1996-07-17 11:26:05 +00:00
David Greenman
4611b39710 Enable transmit complete interrupt...
(author's explaination):

 Bit 15 is the flag to request a transmit complete interrupt.  The
driver was apparently written to minimize interrupts, and if not for a
3-COM design quirk, everything would be just ducky.
 Prior to loading the outbound packet into the FIFO, the driver checks
to see if there's enough space to contain the packet.  If not, the
driver requests a transmit-available interrupt when there is
sufficient room.  Unfortunately, the card is continuing to process the
prior FIFO, and by the time the driver sets the threshold for a
transmit available interrupt, the space is already available.  When
this occurs, the 3COM card ignores the interrupt request, and the
driver is hung waiting for an interrupt that will never occur.
There's probably a more elegant solution, but requesting the transmit
complete interrupt was the easiest to implement.  An alternative fix
might be to check free FIFO space again, after requesting the transmit
available interrupt, but I haven't bothered pursuing this.  Since the
patch, my 3C590 (PCI, same FIFO interface as 3C509) has been rock
solid.

Submitted by:	mevans@candle.com (Mike Evans)
1996-07-13 10:49:53 +00:00
Bruce Evans
cba2a7c614 Staticized a few variables.
Fixed warnings about unused variables.
1996-07-12 07:41:34 +00:00
Bruce Evans
6ab46d52a5 Don't use NULL in non-pointer contexts. 1996-07-12 04:12:25 +00:00
John Hay
d805b866fa This driver supports the SDL Communications RISCom/N2 ISA cards that is
based on the HD64570 chip. Both the 1 and 2 port cards is supported.

Line speeds of up to 2Mbps is possible. At this speed about 95% of the
bandwidth is usable with 486DX processors.

The standard FreeBSD sppp code is used for the link level layer. The
default protocol used is PPP. The Cisco HDLC protocol can be used by
adding "link2" to the ifconfig line in /etc/sysconfig or where ever
ifconfig is run.

At the moment only the X.21 interface is tested. The others may need
tweaks to the clock selection code.
1996-07-05 18:51:59 +00:00
Bruce Evans
f6b4ae3c82 Added or restored #include of <machine/md_var.h>. Some declarations
moved from <machine/cpufunc.h> to better places.
1996-07-01 20:29:10 +00:00
Bruce Evans
d2700ee639 Use the standard timer (interrupt) frequency while calibrating the clocks.
Testing with the high frequency of 20000 Hz (to find problems) only found
the problem that this frequency is too high for slow i386's.

Disable interrupts while setting the timer frequency.  This was unnecessary
before rev.1.57 and forgotten in rev.1.57.  The critical (i8254) interrupts
are disabled in another way at boot time but not in the sysctl to change
the frequency.
1996-07-01 18:00:47 +00:00
Peter Wemm
dcca5a532d Fix typo that prevented the initial/lock state devices from working
correctly (accessing the lock device was not possible).
1996-06-30 04:56:05 +00:00
Joerg Wunsch
a9e9062ca1 Bump various timeouts in scprobe(). This finally fixes the broken
keyboard reset one of my earlier commits has been causing.
1996-06-27 21:36:11 +00:00
Søren Schmidt
da040b2280 Fixed bug in pasting 8bit char (ache).
Added linefeeds in cuts that extend beyond one line.
Prepared for the mousefunctions to be used in nontext modes.
1996-06-26 13:04:53 +00:00
Bruce Evans
c673fe98d7 Added #include of <machine/md_var.h>. This will be needed when
some declarations are moved from <machine/cpufunc.h> to better
places.
1996-06-25 20:31:01 +00:00
Søren Schmidt
ad0c0c784f Change the way moused talk to syscons, now its only delivering mouseevents
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.
1996-06-25 08:54:57 +00:00
Bruce Evans
ea959743cb Moved declarations of static functions to the correct file. This fixes
hundreds of warnings from -Wunused in lkm/syscons/*.
1996-06-23 17:12:05 +00:00
Bruce Evans
5c496ee31e Don't (re)define or use ACTUALLY_LKM_NOT_KERNEL - use the existing
definition of QCAM_MODULE for everything involving LKM'ness.

Makefile:
Don't add -I/sys to CFLAGS.  bsd.kmod.mk adds the correct (relative)
path.
1996-06-23 14:41:55 +00:00
Peter Wemm
17b944a6a7 When writing the settings for stop bits and output hardware flow control,
things tend to work better if you write the settings to the correct
register.. (*blush*).  This subtle bug has been haunting me for ages, and
will solve a few problems that have been reported to me.

Also, take a shot at fixing the serial BREAK processing, what was there
before never really worked.  (There is a PR on this I think)
1996-06-21 21:35:01 +00:00
Søren Schmidt
ab35f219ac Oops, fix a bug that caused updates to the screen to happen, without
anything actually changed, in this case the mousepointer logic.
1996-06-21 11:31:09 +00:00
Søren Schmidt
de4d1b835e Some news for syscons (long overdue):
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.
1996-06-21 07:19:18 +00:00
Bruce Evans
9b2b0822b7 Removed unused #includes of <i386/isa/icu.h> and <i386/isa/icu.h>. icu.h
is only used by the icu support modules and by a few drivers that know
too much about the icu (most only use it to convert `n' to `IRQn').  isa.h
is only used by ioconf.c and by a few drivers that know too much about
isa addresses (a few have to, because config is deficient).
1996-06-18 01:22:40 +00:00
Peter Wemm
e999a90a90 This time, get rid of the struct copies that were really causing gcc to
call memcpy..  It seems that gcc would not inline the implicit call
when copying from a volatile...
1996-06-17 18:52:53 +00:00
Bill Paul
afe0e92aa8 Stomp another compiler warning: sc_devfs_token[] should only be declared
if DEVFS is #defined.
1996-06-17 17:21:35 +00:00
Bruce Evans
f0ea07bffb Reduced nesting of #includes in random.h and adjusted isa/random_machdep.c
to match (pc98/random_machdep.c probably requires a similar change).  This
is a problem area for the PC98 merge - all PC98 ifdefs in <machine/*.h> are
kludges to work around incorrect layering.
1996-06-17 16:47:43 +00:00
Bruce Evans
7d64a7fe80 Added support for TIOCDCDTIMESTAMP (enable/get timestamp of last DCD rise).
Original version by John Hay.

Simplified timestamp code by reading the time exactly when necessary.
This may slow down the interrupt handler with extra calls to microtime(),
but only in bad configurations - the input fifo should normally be
disabled if timestamps on input are being used, since otherwise the
timestamp won't be precisely associated with any particular input event.
The interrupt handler remains slowed down by one test and branch for
each input (and now DCD change) event - avoiding this is not practical
yet.

The simplifications also fixed:
- timestamps for input sometimes being clobbered by output and modem
  status interrupts.
- valid timestamps not being available unless the port is configured with
  vector siointrts.  siointrts no longer exists.
- compiler warnings about siointr* in some configurations.

Simplified timestamp and probe code by depending on recent changes in
microtime() and DELAY() to preserve the interrupt enable flag.
1996-06-17 14:23:39 +00:00
Bruce Evans
16263f7a8b In getit(), use read_eflags()/write_eflags() to preserve the interrupt
enable flag instead of enable_intr() to restore it to its usual state.
getit() is only called from DELAY() so there is no point in optimising
its speed (this wasn't so clear when it was extern), and using
enable_intr() made it inconvenient to call DELAY() from probes that need
to run with interrupts disabled.
1996-06-17 12:50:22 +00:00
Peter Wemm
bde5e68a33 Fix cut/paste error; a read-only variable should have been read/write. 1996-06-16 13:32:16 +00:00
Nate Williams
771acaaa0a Whoops, I accidentally deleted a necessary ":" which is part of the
parameters to printf() using the "D" format.  (Why this even worked on
my box during testing I don't know, but as soon as I powered it on/off
it quite working.)
1996-06-15 00:43:03 +00:00
Nate Williams
333f7d7bb6 At long last, we know have support for the 3C589 in a FreeBSD release
using the existing files using the existing PCCARD support.  Now that
this is in place I would like to fixup the PCCARD hooks and remove the
if_zp driver.  At this point, we support everything we used to support
*AND MORE* with the PCCARD code.

Submitted by:	Naoki Hamada <nao@sbl.cl.nec.co.jp> (via the Nomad release)

[ This works on both my 3C589B and 3C589C ]
1996-06-14 22:11:38 +00:00
Nate Williams
8ca7c1c4a0 Better code for switching the ethernet transceiver.
My 3C509B-COMBO works fine with the following patch. Switching between
UTP and BNC is quite easy. (Just type 'ifconfig ep0 link1 -link2' or 'ifconifg
ep0 link2 -link1'.)

[ I tested this with the additional PC-CARD patches and it works on both
connectors on my 3C589B and 3C589C ]

Reviewed by:	nate
Submitted by:	Naoki Hamada <nao@sbl.cl.nec.co.jp>
1996-06-14 21:28:35 +00:00
Satoshi Asami
ad63a118b2 The Great PC98 Merge.
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
1996-06-14 11:02:28 +00:00
Stefan Eßer
21219d2116 Change CONF1_ENABLE_MSK to 0x7ff00000 in another attempt to decide
whether a system could possibly support PCI configuration mechanism 1
(or whether it rather is an EISA only system ...).
1996-06-13 21:50:41 +00:00
Gary Palmer
c23670e294 Clean up -Wunused warnings.
Reviewed by:		bde
1996-06-12 05:11:41 +00:00
Gary Palmer
10a466c7d3 Clean up -Wunused warnings. Also clean up a -Winline warning while here.
Reviewed by:		bde
1996-06-12 05:04:51 +00:00
Gary Palmer
7b3628096c Clean up -Wunused warnings.
Reviewed by:	 Greg Ungerer <gerg@stallion.oz.au>
1996-06-12 04:26:36 +00:00
Paul Traina
8f33d986bc Move warning messages under bootverbose 1996-06-11 16:11:27 +00:00
Paul Traina
6d715e951e Put clock calibration #defines in opt_clock.h to ease reconfiguration 1996-06-11 16:02:55 +00:00
Joerg Wunsch
2e60812e3a Fix the spl handling. There's still the effect that the timers have
sometimes already been released at the time pcaclose() is called, but
this is now prevented from deadlocking by checking for a running timer
at the start of pca_wait().

At least, i can now play xboing again with pcaudio, this used to hang
the entire system previously within a few seconds.
1996-06-09 14:23:13 +00:00
Andrey A. Chernov
88926e45d5 Implement CDIOCCLOSE 1996-06-09 12:17:53 +00:00
Peter Wemm
80b53b4fd5 Eliminate a struct copy that gcc doesn't inline and ends up as a call to
memset().
1996-06-08 10:18:12 +00:00
Bruce Evans
5610112b22 Fixed calculation of the number of cylinders. wdp_cylinders (was
wdp_fixedcyl) gives it directly.  wdp_removedcyl is "reserved" except
in ancient ATA-1 drafts and shouldn't be added.  This fixes PR 1288.

Changed some fields and comments in struct wdparams to match a less-
ancient ATA draft.

Fixed bit number for `rdy' in status string.
1996-06-08 10:03:38 +00:00
Bruce Evans
7dad0d7ef9 Removed recently introduced unnecessary #includes of <machine/cpu.h>
(bootverbose isn't there in -current) and nearby unnecessary #includes.
1996-06-08 09:37:51 +00:00
Bruce Evans
e7f1854cb7 Fixed group and permissions for devfs devices (group operator was games;
permissions 0640 was 0600).
1996-06-08 09:18:27 +00:00
Bruce Evans
7cc1644db3 Fixed existence, minor numbers, group and permissions for devfs devices
(locked devices weren't created; minor numbers didn't depend on the unit
number; group operator was games; permissions 0640 was 0600).
1996-06-08 09:17:51 +00:00
Bruce Evans
5e0fc49ea8 Replaced some memcpy()'s by bcopy()'s.
gcc only inlines memcpy()'s whose count is constant and didn't inline
these.  I want memcpy() in the kernel go away so that it's obvious that
it doesn't need to be optimized.  Now it is only used for one struct
copy in si.c.
1996-06-08 08:18:00 +00:00
Nate Williams
beca01611f Bring in changes from if_ep.c for PCCARD driver.
Properly determine the offset of the remaining bytes we need to transfer
after outsl'ing all the long words we can during transmission in 32bit mode.
1996-06-04 21:41:01 +00:00
Joerg Wunsch
89cabf8664 Hide the ``wrong signature'' message behind bootverbose. It's
annoying for people who don't have a bus mouse.
1996-06-02 18:57:17 +00:00
Paul Traina
53df9ccfca Fix ioctl() operations...nasty typo 1996-05-31 17:35:07 +00:00
Peter Wemm
ee323f62ad Jump some hoops to have the *.s code being able to be run through both an
ansi and traditional cpp.

The nesting rules of macros are different, which required some changes.
Use __CONCAT(x,y) instead of /**/.
Redo some comments to use /* */ rather than "# comment" because the ansi
  cpp cares about those, and also cares about quote matching.
1996-05-31 01:08:08 +00:00
Peter Wemm
c15b6c4bc6 When estimating the time (in ms) left to drain the output queue based
on the baud rate, dont get upset if it's been hung up by setting B0.
Instead, sleep for a short time, as the host controller takes a while
to go through the state changes.
1996-05-30 23:41:35 +00:00
Gary Palmer
d9378aac9a Clean up the warnings produced by the recent PCI code. Requested by
SE since he doesn't have good access right now
1996-05-27 22:32:23 +00:00
Peter Wemm
d2dc185840 Fix the warnings about "cant inline call to xxx" by reordering two
functions.  It seems gcc wants to have seen the definitions of the
function before it will insert it inline in a caller.
1996-05-27 06:02:52 +00:00
Justin T. Gibbs
c6841cd18f Properly determine the offset of the remaining bytes we need to transfer
after outsl'ing all the long words we can during transmission in 32bit mode.

Closes PR:i386/1243
Submitted by:	flash@eru.tubank.msk.su
1996-05-24 15:22:36 +00:00
Dima Ruban
2dfdc2cd79 "board not responding" -> "board is not responding"
Reviewed by:	gibbs
1996-05-22 00:04:12 +00:00
Stefan Eßer
8408422768 Add support for NE2000 compatible PCI Ethernet cards. The PCI probe
is enabled by having an "device ed0 at isa? [...]" config line.
The first PCI card will get a unit number one higher than the highest
defined for any ISA card of the ED type, e.g. if ed0 and ed1 are
configured, then the PCI cards will be ed2, ed3, ...

BEWARE: If you have configured your kernel as ed0 with the port address
as assigned by the PCI BIOS, then your card will be found by both the
PCI and ISA probes, and bad things may happen. Make sure to restore
the original port address form the GENERIC kernel for the ed0 device!

Reviewed by:	davidg
1996-05-18 17:56:42 +00:00
Joerg Wunsch
09fdca5394 Fix the "well-known retries bug" (a logic-o). 1996-05-12 12:36:59 +00:00
Joerg Wunsch
a9313682fc Give up waiting for a successful keyboard reset after some
unreasonable time.  I've got a PCI mainboard that simply doesn't grok
it, so continuing with a warning (and a keyboard that's working
nevertheless :) seems to be better than spin-looping forever.
1996-05-11 23:16:23 +00:00
Peter Wemm
809959779f *blush* How did this slip through?
Fix a dynamic initialiser in a static variable, and make sure sysctl.h
is #included.
1996-05-08 04:48:25 +00:00
Nate Williams
757dab8dcb Simplify probe. Removed the DELAY() as it's not needed. 1996-05-07 22:33:19 +00:00
Nate Williams
0e76201114 Removed one of the un-documented CTRL pokes, and replace it with a one
second delay.  My ps/2 mouse is now found reliably on my ThinkPad (it
didn't before) and still works on my NEC Versa.

Submitted by:	Richard Wiwatowski <rjwiwat@adelaide.on.net>
1996-05-07 21:59:44 +00:00
Nate Williams
f73355c18f Make sure you include <sys/devconf.h> if you have devconf code. :( 1996-05-07 21:56:46 +00:00
Nate Williams
a0245aeb1a Added code to avoid keyboard 'hangs' during the probe.
Submitted by:	Richard Wiwatowski <rjwiwat@adelaide.on.net>
1996-05-07 21:48:55 +00:00
Nate Williams
0c7b035e39 Added devconf() support.
Obtained from: Richard Wiwatowski <rjwiwat@adelaide.on.net>
1996-05-07 21:32:29 +00:00
Nate Williams
077e6558ec Re-wrote psm_poll_status() to use the ioport supplied in the kernel
config file instead of hard-coding it in the driver.  No functional
differences.

This is based on the code Richard Wiwatowski <rjwiwat@adelaide.on.net>
sent to the mailing list.
1996-05-07 21:11:13 +00:00
Nate Williams
110f70b852 Last typo fixed (network came up for a few minutes). 1996-05-07 20:39:34 +00:00