Commit Graph

1776 Commits

Author SHA1 Message Date
Bruce Evans f94276a095 Removed yet another vestige of devconf. 1997-07-20 12:34:15 +00:00
Bruce Evans 288f6303ba Finished (?) converting md_regs to a `struct trapframe *'. Some bogus casts
are now unnecessary.
1997-07-20 12:33:19 +00:00
Bruce Evans e852f922ab Uniformized idempotency ifdef. 1997-07-20 12:26:34 +00:00
Bruce Evans 9d675655a2 Fixed missing indent protection in copyright.
Uniformized idempotency ifdef.
1997-07-20 12:18:53 +00:00
Bruce Evans 6fdad28eb1 Removed unused #includes. 1997-07-20 11:58:40 +00:00
Bruce Evans 921cf4d2a2 #include <machine/stdarg.h> in the one place in pcvt that it is used
instead of centrally.
1997-07-20 11:28:41 +00:00
Bruce Evans f5f91b3249 Removed a stray semicolon. 1997-07-20 11:19:46 +00:00
Bruce Evans 395d48aff0 Removed unused #includes.
Updated an #include to 4.4Lite style (missed one).
1997-07-20 11:14:53 +00:00
Bruce Evans dd1df1935f Moved some definitions of initialized data nearer to the start of
the file so that this compiles without forward declarations of that
data.  (It is impossible to forward-declare static data in Gnu C.
Declaring it as static is correct, but causes bogus warnings from
gcc -Wredundant-decls.  Declaring it as extern works, but causes
correct warnings from gcc -pedantic and is undefined in ANSI C.
We usually declare it as extern.  Here it was once really extern,
but botched staticization left it as static here and apparently-
extern in a header file.)
----------------------------------------------------------------------
another system, such as NetBSD, CVS:   then name the system in this
line, otherwise delete it.  CVS: Reviewed by:  CVS:   Before
committing changes please have someone check your work and CVS:
include their name here. If the change is trivial and you have not
else; i.e., CVS:   they sent us a patch or a new module, then
include their name/email CVS:   address here. If this is your work
then delete this line.  CVS:
----------------------------------------------------------------------
----------------------------------------------------------------------
1997-07-20 10:07:55 +00:00
Steve Passe 797cb61b54 Added #code to support define APIC_PIN0_TIMER.
This code ALWAYS runs the 8254 timer thru the 8259 ICU.
It depricates the usage of "options SMP_TIMER_NC" in the config file.
1997-07-19 03:59:28 +00:00
Steve Passe bed422e5a3 SMP or APIC_IO:
- Increased NIDT to 256.
 - Moved IPI vectors up above the linux compat vector.
 - Removed runtime setup of RTC vector.
1997-07-19 02:28:30 +00:00
Steve Passe d2ecb616f2 Split TEST_CPUSTOP code into CPUSTOP_ON_DDBBREAK and mainline code. 1997-07-18 21:27:53 +00:00
Steve Passe 7bbd2262eb Made the printing of the APIC INTs depend on bootverbose. 1997-07-18 03:59:28 +00:00
John Dyson 955bc15107 Add some support for the 16650 type UARTS. 1997-07-17 06:01:15 +00:00
Peter Wemm 5611a020da Remove the disable for the P5 cpu class bcopy using the FPU on SMP kernels,
it is understood to work now (and has been for quite a while apparently).
1997-07-17 02:09:25 +00:00
Kazutaka YOKOTA 870521063a Screen saver related fixes.
1. Add new interface, add_scrn_saver()/remove_scrn_saver(), to declare
loading/unloading of a screen saver.  The screen saver calls these
functions to notify syscons of loading/unloading events.

It was possible to load multiple savers each of which will try to
remember the previous saver in a local variable (`old_saver'). The
scheme breaks easily if the user load two savers and unload them in a
wrong order; if the first saver is unloaded first, `old_saver' in the
second saver points to nowhere.

Now only one screen saver is allowed in memory at a time.

Soeren will be looking into this issue again later.  syscons is
becoming too heavy.  It's time to cut things down, rather than adding
more...

2. Make scrn_timer() to be the primary caller of the screen saver
(*current_saver)(). scintr(), scioctl() and ansi_put() update
`scrn_time_stamp' to indicate that they want to stop the screen saver.

There are three exceptions, however.

One is remove_scrn_saver() which need to stop the current screen saver
if it is running. To guard against scrn_timer() calling the saver during
this operation, `current_saver' is set to `none_saver' early.

The others are sccngetc() and sccncheckc(); they will unblank the
screen too.  When the kernel enters DDB (via the hot key or a
break point), the screen saver will be stopped by sccngetc().
However, we have a reentrancy problem here. If the system has been in
the middle of the screen saver...

(The screen saver reentrancy problem has always been with sccnputc()
and sccngetc() in the -current source. So, the new code is doing no
worse, I reckon.)

3. Use `mono_time' rather than `time'.

4. Make set_border() work for EGA and CGA in addition to VGA. Do
nothing for MDA.

Changes to the LKM screen saver modules will follow shortly.  YOU NEED
TO RECOMPILE BOTH SCREEN SAVERS AND KERNEL AS OF THESE CHANGES.

Reviewed by: sos and bde
1997-07-15 14:43:27 +00:00
Steve Passe bb0be67512 Cleanup. 1997-07-15 03:28:53 +00:00
Steve Passe 4e914a7eb7 Tighten up asm code for EOI access. 1997-07-15 02:49:21 +00:00
Kazutaka YOKOTA 99ec86e438 scgetc() referred to `spcl' in different ways when a key is pressed
and released.  It should use `spcl' consistently in both cases,
otherwise shift/control/alt state may not be correctly set/reset.

(Even with this fix, you can still make syscons confused and fail to
change internal state if you really want to, by installing a really
arcane and artificial keymap.)

PR: i386/4030
Reviewed by: sos
1997-07-14 03:36:50 +00:00
Steve Passe c064ef9175 Cleanup old stop_cpus/restart_cpus() cruft.
new code for handling mixed-mode 8259/APIC programming without 'ExtInt'
new code to control other CPUs: stop_cpus()/restart_cpus()/_Xstopcpu
1997-07-13 01:18:51 +00:00
Andrey A. Chernov d80e841377 Back out my changes with 'conflicts' keyword for IRQs,
sounddriver fixed now.
1997-07-09 17:58:16 +00:00
Brian Somers b73937137c Don't allow CONS_HISTORY ioctl to alter history pointers
while in "scroll mode" (return EBUSY).
Suggested by:	Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
1997-07-09 14:10:19 +00:00
Andrey A. Chernov 5fe7f59b19 Don't pass configured information back to ISA for this subdevices,
it cause conflicts
1997-07-08 15:35:28 +00:00
Brian Somers 5d20d6843c Remove useless comparison.
Suggested by:	Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
1997-07-08 13:38:58 +00:00
Brian Somers b43f9ca153 YAMF2.2: Handle indirect results of "kbdcontrol -h X"
where X < 25.
1997-07-07 13:42:42 +00:00
Steve Passe b956b5370c First cut at code for handling "spurious INTerrupts".
First cut at code for handling CPU stop/restart.

Notes:
	not working properly yet.
1997-07-06 23:32:38 +00:00
Steve Passe 01bd6212ca Added a hook for a "spurious INTerrupt handler". 1997-07-06 22:11:26 +00:00
Bruce Evans a24a66635c Don't depend on gcc's feature of permitting labels that aren't followed
by a statement.
1997-07-01 00:22:51 +00:00
Kazutaka YOKOTA ac4c944d67 Fixes annoying behavior and a bug regarding the destructive
cursor (CHAR_CURSOR)

1. Reduced the number of calls to set_destructive_cursor().  The
destructive cursor produced noticeable overhead on the system.  It was
caused by draw_cursor_image() calling set_destructive_cursor() every
so often.

set_destructive_cursor() absolutely needs to be called when

a) the character code under the cursor has changed either because
   the cursor moved or because the screen was updated or the mouse
   pointer overlapped the cursor.
b) Or a new font has been loaded,
c) or the video mode has been changed,
d) or the cursor shape has been changed,
e) or the user switched virtual consoles.

2. Turn off the configuration flag CHAR_CURSOR (destructive cursor) in
scattach() if we have a non-VGA card.  The destructive cursor works
only for VGA.

3. Removed redundant calls to set_destructive_cursor() in some places.

4. Fixed the "disappearing mouse pointer" problem. The mouse pointer
looked hidden under the destructive cursor when it overlaped the cursor.

A slightly different version of the patch was reviewd and OKed by
sos and ache.
1997-06-30 13:31:49 +00:00
Kazutaka YOKOTA bf3c452e20 Add experimental APM support for some laptops.
If the configuration option PSM_HOOKAPM is defined and the APM device
is available, the psm driver will issue the ENABLE command to the
pointing device at the resume APM event if the device was open when
the system went into suspended mode. If the option
PSM_RESETAFTERSUSPEND is specified in addition to PSM_HOOKAPM, the
driver will try to reset the pointing device before sending the
ENABLE command.

Built-in PS/2-type pointing devices in some laptops (all the reports I
heard were about Toshiba models) sometimes don't work immediately
after the system is resumed. The device MAY become available after a
while. The system may exhibit the same symptom in other OS's too
(no, FreeBSD is not the only OS that is suffering :-).

I don't know the correct way of solving this yet, but it's been
reported that issuing the ENABLE command after resumption wakes up the
pointing device.

Without PSM_HOOKAPM, the psm driver behaves in the same way as before.

Problem reported in the bsd-nomads mailing list in Japan.
1997-06-30 12:52:57 +00:00
Andrey A. Chernov 32721aad4f dev->id_flags --> flags
(not compiles otherwise)
1997-06-29 22:23:32 +00:00
Kazutaka YOKOTA a2fc20d086 A fix/work-around for ThinkPad 535.
Add a new configuration flag, KBD_NORESET (0x20) to tell scprobe() not
to reset the keyboard.

IBM ThinkPad 535 has the `Fn' key with which the user can perform
certain functions in conjunction with other keys. For example, `Fn' +
PageUP/PageDOWN adjust speaker volume, `Fn' + Home/End change
brightness of LCD screen. It can also be used to suspend the system.

It appears that these functions are implemented at the keyboard level
or the keyboard controller level and totally independent from BIOS or
OS.  But, if the keyboard is reset (as is done in scprobe()), they
become unavailable.  (There are other laptops which have similar
functions associated with the `Fn' key. But, they aren't affected by
keyboard reset.)

ThinkPad 535 doesn't have switches or buttons to adjust brightness and
volume, or to put the system into the suspend mode. Therefore, it is
essential to preserve these `Fn' key functions in FreeBSD. The new
flag make scprobe() skip keyboard reset.

If this flag is not set, scprobe() behaves in the same say as before.

(If we only knew a way to detect ThinkPad 535, we could skip keyboard
reset automatically, but...)
1997-06-29 15:11:40 +00:00
Steve Passe 58db75841d apic_vector.s:
- added Xcpustop IPI code to support stop_cpus()/restart_cpus().
   it is off by default, enable via smptests.h:TEST_CPUSTOP

intr_machdep.h:
 - moved +ICULEN to lower level.
 - added entry for Xcpustop.
1997-06-27 23:48:05 +00:00
Justin T. Gibbs 374114db56 KNF cleanup. 1997-06-27 19:36:27 +00:00
Steve Passe 293f18dbbf Modified to use merged/renamed functions:
- get_isa_apic_mask() -> isa_apic_mask()
 - get_isa_apic_irq() && get_eisa_apic_irq() -> isa_apic_pin()
1997-06-25 21:00:00 +00:00
Peter Wemm b3196e4b9f Preliminary support for per-cpu data pages.
This eliminates a lot of #ifdef SMP type code.  Things like _curproc reside
in a data page that is unique on each cpu, eliminating the expensive macros
like:    #define curproc (SMPcurproc[cpunumber()])

There are some unresolved bootstrap and address space sharing issues at
present, but Steve is waiting on this for other work.  There is still some
strictly temporary code present that isn't exactly pretty.

This is part of a larger change that has run into some bumps, this part is
standalone so it should be safe.  The temporary code goes away when the
full idle cpu support is finished.

Reviewed by: fsmp, dyson
1997-06-22 16:04:22 +00:00
Kazutaka YOKOTA 124ff4169d The syscons driver doesn't really check the presence of the display
adapter during the system boot. It always assumes there is at least a
monochrome adapter.

This is rather strange assumption. If there is no dispaly adapter, the
console driver cannot be any good...

In this patch, scinit() is split into two parts; the first part is
now called scvidprobe() which will detect the presence of video card
at the CGA or MONO buffer address and returns TRUE if found. It is
called during sccnprobe() and scprobe(). Both will fail if no video
card is found.

The second part, whose name stays the same as before, scinit(), is
called from sccninit() and scattach() to complete initialization of
the found video card.

The keyboard probe code is moved from scprobe() to sckbdprobe();
scprobe() now calls scvidprobe() and sckbdprobe() to carry out device
probe. (This is rather a cosmetic change, but it sure makes the code
look better organized.)

The problem pointed out by Joerg.
1997-06-22 12:04:36 +00:00
Bruce Evans 9edc7ccf77 Fixed the type of a timeout function and removed casts that hid the
problem.  There was no problem in practice (at least on 386's).
1997-06-14 14:54:55 +00:00
Justin T. Gibbs 9996b3a56a Fix two typos in this driver that prevented it from working properly.
PR: kern/3776
Submitted by: flash@hway.ru
1997-06-10 16:07:22 +00:00
Andrey A. Chernov 833bdc932c While deciding to install irq with unneded "conflicts" keyword,
additionly check that intr vector is non-NULL
1997-06-09 00:53:48 +00:00
Andrey A. Chernov 7f533ff73f Add safety check in case "conflicts" keyword specified more times than
needed
1997-06-08 17:15:31 +00:00
Andrey A. Chernov 1886f4968c Make "conflicts" keyword work again 1997-06-08 16:43:37 +00:00
Andrey A. Chernov 0b3a25d648 Remove no irq -> irq 31 conversion 1997-06-08 12:55:26 +00:00
Paul Traina 5ea6cb03f3 Bring back CONSPEED as a last-ditch default if you can't change the speed
any other way.

Requested by: dfr
1997-06-04 16:25:15 +00:00
Paul Traina 2334749d02 If the boot blocks were using the serial port, read the system console
speed using the boot blocks, instead of a hardcoded value stuck in the
kernel.  This way, you can have systems using the same kernel but different
console speeds.

Add a sysctl entry for changing the system console speed.
Lock the user tty speed to match the system console speed.

Nuke CONSPEED.
Reviewed by:	bde
1997-06-04 04:52:40 +00:00
KATO Takenori 6670f8f6e7 Fixed mu-law data. Originator's patch was applied.
PR:		1950
Submitted by:	NAGAO Tadaaki <nagao@cs.titech.ac.jp>
1997-06-03 10:34:40 +00:00
KATO Takenori b7b905e770 Fixed order of data transfer.
Reviewed by:	NAGAO Tadaaki <nagao@cs.titech.ac.jp>
Submitted by:	Takuya SHIOZAKI <tshiozak@makino.ise.chuo-u.ac.jp>
1997-06-03 10:25:41 +00:00
KATO Takenori eeef1264c6 Include <sys/conf.h> 1997-06-03 08:23:26 +00:00
KATO Takenori 40b2de1758 Added PC-98 code. 1997-06-02 15:28:10 +00:00
Doug Rabson 683523378c Move interrupt handling code from isa.c to a new file. This should make
isa.c (slightly) more portable and will make my life developing the really
portable version much easier.

Reviewed by:	peter, fsmp
1997-06-02 08:19:06 +00:00