Commit Graph

260 Commits

Author SHA1 Message Date
Andrey A. Chernov
5d8619d1f2 Workaround IXOFF bug when output queue is full && RTS control is on 1995-02-28 23:21:33 +00:00
Paul Traina
8c5c37cd75 Incorporate bde's code-review comments.
(a) bring back ttselect, now that we have xxxdevtotty() it isn't dangerous.
(b) remove all of the wrappers that have been replaced by ttselect
(c) fix formatting in syscons.c and definition in syscons.h
(d) add cxdevtotty

NOT DONE:
(e) make pcvt work... it was already broken...when someone fixes pcvt to
	link properly, just rename get_pccons to xxxdevtotty and we're done
1995-02-28 00:21:11 +00:00
Bruce Evans
550f8550ec Replace all remaining instances of i386/include' by machine' and fix
nearby #include inconsistencies.
1995-02-26 05:14:53 +00:00
Bruce Evans
eecd3071a6 Don't confuse the frequency with the wavelength in DELAY() args. 960 cps
is close to 1000000 / 960 usec so the confusion probably didn't matter.

Test for COMCONSOLE before testing for RB_SERIAL so that the RB_SERIAL
test can be optimized away if COMCONSOLE is 1.

Simplify and Uniformize style of previous commit.
1995-02-26 02:30:18 +00:00
Bruce Evans
671e2cee97 Declare all the args of Fdopen() and fdclose().
Initialize dk_wpms[] less bogusly.

Clean up includes.

Remove some obsolete comments.
1995-02-26 01:37:51 +00:00
Paul Traina
77f77631e7 (a) remove the pointer to each driver's tty structure array from cdevsw
(b) add a function callback vector to tty drivers that will return a pointer
    to a valid tty structure based upon a dev_t
(c) make syscons structures the same size whether or not APM is enabled so
    utilities don't crash if NAPM changes (and make the damn kernel compile!)
(d) rewrite /dev/snp ioctl interface so that it is device driver and i386
    independant
1995-02-25 20:09:44 +00:00
Andrey A. Chernov
838dadc476 Revive input flow control, some ideas from iverson@leonheart.com
Get rid of TS_RTS_IFLOW, all kinds of input flow control handled
by only one flag now: TS_TBLOCK
Add missing put(VSTOP) when IXOFF control is active.
1995-02-24 00:11:01 +00:00
Jean-Marc Zucconi
95344a43ed Put the joystick status in a struct {int x, y, b1, b2;} rather than in a
dummy array of 4 integers. Declare the struct in the header file and update
the man page.
1995-02-22 23:34:58 +00:00
Søren Schmidt
17ee9d00bc Next syscons update (given up on numbering :)
Removed screensavers from syscons, they are now LKM's. This makes it
possible to do some really "interesting" screensavers...
Fixed bug that sometimes caused garbage to appear when leaving
"scroll-lock" history.
Reformattet indentation, it got too deep for a normal 80 pos screen.
Split up in syscons.c & syscons.h for use with the saver-lkm's.
Temporarily removed -s option from vidcontrol, savers should now
be loaded with modload.
1995-02-22 13:48:07 +00:00
Poul-Henning Kamp
648c711bb4 This is the latest version of the APM stuff from HOSOKAWA, I have looked
briefly over it, and see some serious architectural issues in this stuff.

On the other hand, I doubt that we will have any solution to these issues
before 2.1, so we might as well leave this in.

Most of the stuff is bracketed by #ifdef's so it shouldn't matter too much
in the normal case.

Reviewed by:	phk
Submitted by:	HOSOKAWA, Tatsumi <hosokawa@mt.cs.keio.ac.jp>
1995-02-17 02:22:57 +00:00
Søren Schmidt
314908fae3 Fixed cursor xor problem... 1995-02-14 14:37:53 +00:00
Søren Schmidt
719d3245ae Fixed the bug that caused the cursor to disappear under
boot with -c option
1995-02-07 11:53:27 +00:00
Søren Schmidt
768483b761 Fixed the annoing bug that caused writes to /dev/console to go to
the active virtual terminal (Boy, do I have little hair left).
Misc other fixes, try to enable cursor earlier in the game.
1995-02-05 23:44:25 +00:00
Søren Schmidt
130c74bbe7 Allow all characters except "real" control chars.
Fix NULL reference when serial console (thanks bruce).
1995-02-03 21:09:44 +00:00
Søren Schmidt
786f122175 Syscons bug fix: tab now right (thanks bruce!)
Mouse arrow support almost finished.
1995-02-01 21:56:32 +00:00
Søren Schmidt
6de1193d13 Reviewed by:
Submitted by:
Obtained from:
1995-01-30 21:36:32 +00:00
Jean-Marc Zucconi
2429906c75 Add parentheses around macros! 1995-01-29 01:00:14 +00:00
Søren Schmidt
a926a37b0a Third round in syscons update.
Display update method changed, now allways write in memory buffer,
  then periodically update physical display.
Speed improvements (now > 5 times faster than the old syscons).
History now circular buffer, with changeable size.
History scroll by up/down line, up/down page, home and end.
Backtab proberly implemented.
Now space for 96 function keys, 63 allocated standard, default now
  SCO/SYSV compat again as in the old days.
New keyboard definition files ~share/syscons/keymaps/*
Misc fixes for old "hacks" that broke SCO/SYSV compat.
More that I forgot before writing this...
1995-01-28 22:18:05 +00:00
Jean-Marc Zucconi
7c5329fd30 Do not recompute TIMER0's maximum count, since it is in timer0_max_count.
Use a simpler formula to convert usecs to ticks.
Output is in microseconds instead of ticks, so that values do not depend
on the timer frequency.
1995-01-28 21:54:37 +00:00
Jordan K. Hubbard
ae099941e3 Back out my previous change and disable the floppy tape controller again
by default.  It's hosing up my test machine's floppy pretty good.
1995-01-27 20:03:07 +00:00
Andrey A. Chernov
fd4a3c0b42 Use NUM_FKEYS instead of hardcoded 65 for fkey_tab size 1995-01-26 10:16:51 +00:00
Andrey A. Chernov
f42e354117 Get rid of overloaded Keypad 5, now F(65) 1995-01-26 10:08:39 +00:00
Andrey A. Chernov
b99c427733 Get rid of overloaded Back tab, now F(64) 1995-01-26 10:02:21 +00:00
Andrey A. Chernov
325e89b668 Rewrite fkey_tab to produce unique sequences for all fkeys
Get rid of overloaded fkeys
1995-01-26 09:58:37 +00:00
Andrey A. Chernov
14ed6a7595 Implement Delete key properly, needed by ncurses 1995-01-26 08:43:24 +00:00
Andrey A. Chernov
5ddda58b2e o Restore removed hardware cursor support and make it _default_
case, software cursor now optional case. Driver must provide
  raw things (what hardware do for us, exactly) as default case,
  all driver features must be _optional_. Modern VGAs have internal
  configuration utilities to set cursor shape/blinking which stored
  into cards ROM, and syscons nuke out such features completely
  by forcing software cursor. Moreover, software cursor is hard
  to distinguish on standouted (or near standouted) fields and
  tends to disappearse from the screen.
  Set "flags 0x4" to enable software cursor now.

o Cleanup screen savers.

o Don't draw cursor if saver or blinker is active.

o Duplicated code moved to functons.

o Add more checks for blinker in progress, character lost otherwise
  when blinker restore old contents.

o Reduce blinking counter to 3, too slow in old variant.

o Fix timeout code in scrn_timer(), old variant can reenter iself,
  if action takes too long time.

o Disable visual bell for scroll lock mode, saved screen
  becomes overwritted otherwise.
1995-01-26 04:56:25 +00:00
Jean-Marc Zucconi
3bc6bf1734 Changed address of the game controller to 0x201 (was 0x200)
joy.c: joystick driver
1995-01-25 20:11:51 +00:00
Søren Schmidt
02fb646de1 Second round in syscons update:
Support for pseudo graphic mouse cursor (not complete yet)
Some cheap speed fixes.
More cleanups.
Call ourselves scxxxx finally.
1995-01-20 08:35:32 +00:00
Bill Paul
2b237b4058 Submitted by: Bill Paul (wpaul@ctr.columbia.edu)
Obtained from:
sio.c and sioreg.c changed to allow autodetecting the RB_SERIAL flag
passed by the boot blocks so that the kernel can switch to 'serial
console' mode automagically. 'options COMCONSOLE' can still be specified
to force the kernel to always use the serial port as a console.
CONUNIT and CONADDR can also be specified in the kernel config file
if the user wants to shift the console to a different port.
1995-01-20 07:34:18 +00:00
Andreas Schulz
c82762a9c3 Submitted by: Bruce Evans
Put in the much shorter and cleaner version for the calibrate_cycle_counter
for the Pentium that Bruce suggested. Tested here on my Pentium  and
it works okay.
1995-01-19 22:05:27 +00:00
Jordan K. Hubbard
0b3782714e Enable floppy-tape controller by default again. Flags no longer has any
special meaning.
1995-01-17 17:32:33 +00:00
Søren Schmidt
2a13b58b61 Oops, forgot one change when DDB is defined. 1995-01-13 17:13:13 +00:00
Andrey A. Chernov
b9937fcc84 Use (n - 1) in ESC [ xxx d and ESC [ xxx ` 1995-01-13 03:19:22 +00:00
Andrey A. Chernov
9db2473d62 Back out cursor wrap (restore original thing)
Submitted by: Bill Paul
1995-01-12 20:14:28 +00:00
Joerg Wunsch
dac0f2dbc1 Argl!, finally found this bummer. The code testing for a write-
protected drive at open() time has been *totally bogus*!  The guy who
submitted it didn't understand all the implications of calling
set_motor(), and the `who' who included the patch into the tree did it
blindly...  Pleeeeze, don't commit code to this driver unless you are
really going to understand what it does!  This one caused me to pull
out even more hears, and those who know me do know that i ain't got
too many o'them. :-)
1995-01-12 19:20:28 +00:00
Søren Schmidt
6378775666 First round in syscons update. Several new features has been added:
No kernel config options anymore besides keyboard language layout.
Virtual consoles are now dynamically allocated, no NCONS anymore.
Software cursor blinking/nonblinking.
Visual bell for laptops (don't beep at meetings :-).
Cursor/bell default type setable via config "flags" instead of as defines.
Cursor/bell type setable via ioctl's.
New video modes 80x30 80x60 for some laptops, and those with multisync monitors.
Scroll-lock history (length currently fixed at 100 lines).
Lots of cleanups, some only commented out for now (will goaway soon).
Support for new features in vidcontrol/kbdcontrol.
Updated manpages.
1995-01-12 11:47:05 +00:00
Joerg Wunsch
dc16046f96 Finally implement support for the `lsdev' program. The controller is
now marked busy as long as it's being in non-reset state, and the
drives are busy as long as at least one instance is open.

Also reformat everything to fit into 80 columns again.

Changed my mind wrt. error reporting for a write-protected drive and
an open() with write intent; ENXIO has been too weird, now return EIO.
Some portions of the code need to be rewritten to use tprintf()
instead of simple printf()'s, so the messages will also appear on the
session terminal, however.
1995-01-11 16:13:01 +00:00
Andreas Schulz
a9700525d8 Work around a compiler bug in gcc2.6.3 in handling (long long) variables and
shifting. Also correct the original code as Garrett noticed it in mail.
Leave the mishandled code in to use it later if future versions of gcc
are correct. The code was part of the calibrate_cyclecounter routine to
get the speed of the pentium chip.
1995-01-07 17:26:35 +00:00
Joerg Wunsch
dc5df763e4 Peter's work to work around one of the most annoying bugs in the
floppy driver (or in the hardware?).  It turned out to be caused by
spurious interrupts, right after an FDC reset.

Also major cleanup in the low-level structure, there are now functions
performing error-checks for the FDC I/O.

Submitted by:	(mostly) Peter Dufault <dufault@FreeBSD.org>
1995-01-06 15:20:00 +00:00
Bruce Evans
123bcf5fda Fix scaling for TIOCM[SG]DTRWAIT to work when hz != 100.
Bruce
1995-01-06 15:03:41 +00:00
Andrey A. Chernov
33c38bd574 Fight against hanging modems: add timeout to ttywait.
Reviewed by: Bruce
1995-01-05 00:01:07 +00:00
Bruce Evans
f73f117cf0 Don't allow negative console numbers for the VT_WAITACTIVE ioctl. Use the
correct console number for the VT_WAITACTIVE ioctl.  Invalid console numbers
caused waiting on an invalid pointer.

Use bcopyw() instead of move_up() and move_down().  bcopyw() handles
overlapped copies and should be faster.  Actually use bcopy().  bcopy()
is slightly faster if video memory is 16-bit and about twice as fast if
it is 32-bit.  bcopy() is said to fail on someGA's, but syscons already
depends on it working for other accesses to video memory.
1995-01-03 16:56:05 +00:00
Andreas Schulz
d3287e7c11 Change the errors in the XT_KEYBOARD patch. red in the face. Thanks Bruce. 1994-12-31 20:34:19 +00:00
Jordan K. Hubbard
63c5d14d1b Miscellaneous changes from Bill Paul:
- /sys/i386/isa/if_ed.c doesn't quite know how to deal with SMC EtherEZ
  ethernet cards. The EtherEZ looks just like the Elite Ultra, except it
  has only 8K of shared memory. The only way to have it properly detected
  is to zero and test a few bytes of memory just about the first 8K region.
  If it clears properly, it's an Elite Ultra, otherwise it's an EtherEZ.

  I've also got an EtherEZ patch for netboot (Makefile, ether.c and ether.h).

- /sys/i386/isa/syscons.c wraps at the next to the last column rather than
  the last column, like it should. You don't really notice this unless you
  use certain programs that write all the way out to, say, the 80th column,
  like VMSmail. Along with a one-line fix for this are some changes to
  implement a non-blinking cursor. Put 'options "NOBLINK_CURSOR"' in your
  config file and give it a try. :)

Submitted by:	wpaul
1994-12-31 17:09:58 +00:00
Andrey A. Chernov
1af33e5a7a Changes to allow keypad 5 produce \E[E like SCO/ANSI term does 1994-12-31 11:38:39 +00:00
Bruce Evans
43469be308 icu.s:
Move definition of `stat_imask' to clock.c.

clock.c:
Rename `rtcmask' to `stat_imask' and export it.  Rename `clkmask' to
`clk_imask' for consistency.

Only calculate TIMER_DIV(hz) once.

Merge debugging and "garbage" code to produce debugging code and format the
output better.

Make writertc() static inline and use it everywhere.  Now all accesses to
the clock registers go through rtcin() and writertc().

Move rtc initialization to cpu_initclocks().

Merge enablertclock() with cpu_initclocks() and remove enablertclock().
The extra entry point was just a leftover from 1.1.5.
1994-12-30 12:43:35 +00:00
Bruce Evans
0c4fe20e8a Keep track of the devconf state. 1994-12-27 13:07:07 +00:00
David Greenman
2048dd682c Fixed two security holes in the pcmmap() function.
Submitted by:	Bruce Evans
1994-12-27 08:43:06 +00:00
Andreas Schulz
3c8f8257cd Add a patch that someone on the net has used to run on his IBM Thinkpad.
Sorry, lost the name and mail of the original author. The whole patch
is ifdefed, so it should not disturb someone else in the moment.
1994-12-26 17:50:18 +00:00
Joerg Wunsch
0246a9d813 Initialize syscons also in cases where it ain't the system's console
(i.e., there's a comconsole).
1994-12-18 19:45:53 +00:00