Commit Graph

8376 Commits

Author SHA1 Message Date
John Dyson
11cccda1de Fix a very subtile problem that causes unnessary numbers of objects backing
a single logical object.
Submitted by:	Alan Cox <alc@cs.rice.edu>
1997-07-27 04:44:12 +00:00
Andrey A. Chernov
1d7adc8bea SUNIT: exchange back whole ifnet structures since they are in the linked
list, not device numbers only
1997-07-26 20:13:56 +00:00
Andrey A. Chernov
b2296ca150 Forget to change units in prev. SUNIT commit. Move variales to local
section for SUNIT.
1997-07-26 19:09:12 +00:00
Andrey A. Chernov
0229106442 Exchange whole structures on SUNIT, not unit+flags fields only.
It is needed because if_attach() assumes fixed units order
and pass it to ifconfig
1997-07-26 18:47:56 +00:00
Steve Passe
978bf230f5 Comment out PEND_INTS for now, it breaks ISA INTs.
Reported by:	dave adkins <adkin003@gold.tc.umn.edu>
1997-07-26 17:38:43 +00:00
Jean-Marc Zucconi
ffd8332856 Ignore the block size returned by scsi_read_capacity(): this value is
rarely correct and the block size is already specified in the prepare_track()
functions.
1997-07-26 15:07:42 +00:00
KATO Takenori
99bf679bcf Synchronize with sys/i386/isa/syscons.c revision 1.228. 1997-07-26 13:54:01 +00:00
KATO Takenori
2f2a1f2613 Synchronize with sys/i386/conf/options.i386 revision 1.52. 1997-07-26 13:53:27 +00:00
KATO Takenori
95ec91943b Synchronize with sys/i386/isa/clock.c revision 1.98. 1997-07-26 13:52:47 +00:00
Poul-Henning Kamp
9587ee1621 Fix a brino in my last commit.
Noticed by:	smp
1997-07-26 07:58:29 +00:00
Steve Passe
f9e8dbb8c3 mpapic.c & mp_machdep:
- removed TEST_ALTTIMER.
 - removed APIC_PIN0_TIMER.
 - removed TIMER_ALL.

mplock.s:
 - minor update of try_mplock for new algorithm where a CPU uses try_mplock
	instead of get_mplock in the ISRs.
1997-07-26 01:55:19 +00:00
Steve Passe
12084b3cf1 clock.c:
- removed TEST_ALTTIMER.
 - removed APIC_PIN0_TIMER.
 - removed TIMER_ALL.

apic_vector.s:
 - new algorithm where a CPU uses try_mplock instead of get_mplock:
	if successful continue as before.
	if fail set ipending bit, mask INT (to avoid recursion), cleanup & iret.

   This allows the CPU to return to successful work, while the ISR will be run
   by the CPU holding the lock as part of the doreti dance.
1997-07-26 01:53:04 +00:00
Steve Passe
f777396bfa Removed "options SMP_TIMER_NC".
Removed TEST_ALTTIMER.
Removed APIC_PIN0_TIMER.
Removed TIMER_ALL.
1997-07-26 01:47:26 +00:00
Steve Passe
25717e9980 Removed "options SMP_TIMER_NC". 1997-07-26 01:46:03 +00:00
KATO Takenori
96096c4e7d Synchornize with sys/i386/isa/syscons.c revision 1.227. 1997-07-26 01:36:10 +00:00
KATO Takenori
94a95fad51 Synchronize with sys/i386/conf/options.i386 revision 1.51. 1997-07-26 01:35:14 +00:00
KATO Takenori
4b73f65291 Synchronize with sys/i386/conf/files.i386 revision 1.168. 1997-07-26 01:34:33 +00:00
KATO Takenori
58e43095b7 Synchronize with sys/i386/conf/Makefile.i386 revision 1.101. 1997-07-26 01:34:05 +00:00
David Greenman
dd0ebb7f08 Added support for the Seeq 80c24 PHY; does nothing except disable the
unsupported warning message for it.
1997-07-25 23:41:12 +00:00
John Polstra
f7218f9f22 In SCSI diagnostic messages, cause "0x" to be prepended to the number
in the "info" field to make it clear that it is hexadecimal.
1997-07-25 23:25:20 +00:00
Stefan Eßer
c6d84f7c3e Add Ultra-SCSI support and enable more features for advanced
Symbios/NCR SCSI chips (no-flush option, large fifo, ...).

Submitted by:	Gerard Roudier <groudier@club-internet.fr>
1997-07-25 20:45:09 +00:00
Poul-Henning Kamp
38d8a113a9 Add option for compiling in a 8x16 font. 1997-07-25 11:53:30 +00:00
Brian Somers
af782f1c59 Recalculate ip_sum before passing a
re-assembled packet to a divert port.
Pointed-out by:	Ari Suutari <ari@suutari.iki.fi>
VS:   then name the system in this line, otherwise delete it.
1997-07-25 03:58:21 +00:00
Steve Passe
a43193e3e1 simplelock functions removed from apic_ipl.s.
ASM optimization by:	Bruce Evans <bde@zeta.org.au>
1997-07-24 23:51:33 +00:00
Steve Passe
fa4e34805d Removed the simplelock functions.
Cleaned up the other functions.
1997-07-24 23:49:44 +00:00
Steve Passe
e27fb7b666 param.h:
Macros to convert the Lite2 lock manager primitives to the names used
	in the kernel proper.  This allows us to hide them from the lock
	manager till they can be turned on.
smp.h:
	declarations for the new simplelock functions.
1997-07-24 23:48:53 +00:00
Steve Passe
64ab539460 Added a new SMP specific file: i386/i386/simplelock.s.
This code was split off from apic_ipl.s.
It contains the Lite2 lock manager primitives:
 - s_lock_init()
 - s_lock()
 - s_lock_try()
 - s_unlock()
1997-07-24 23:45:17 +00:00
Steve Passe
9edce0605a Fix a difference between the declaration & definition of isa_dmastatus().
Submitted by:	Chuck Robey <chuckr@glue.umd.edu>
1997-07-24 18:05:22 +00:00
Steve Passe
c87f63b6c1 Back out align attribute that corrupts "machine independance" of file.
Submitted by:	Bruce Evans <bde@zeta.org.au>
1997-07-24 18:01:34 +00:00
KATO Takenori
4877e978b3 Treat 6x86MX CPU as 686-class CPU instead of 586-class CPU. 1997-07-24 14:19:25 +00:00
KATO Takenori
8d873bf1dd Synchronize with sys/i386/isa/isa.c revision 1.96. 1997-07-24 14:10:54 +00:00
Mike Smith
a4453045b0 Add isa_dmastatus() for reading the current ISA DMA counter for a
given channel.

Submitted by:	luigi@labinfo.iet.unipi.it (Luigi Rizzo)
1997-07-24 05:27:40 +00:00
Steve Passe
7f6ab10763 Removed the defunct GET_MPLOCK/REL_MPLOCK macros.
These are no-ops for UP, and should have been removed when vector.s
was split into UP and SMP subsets.
1997-07-24 03:24:57 +00:00
Steve Passe
e78205df5b Fixed possible deadlock from recursive INTs on same cpu. Since
we use lazy masking INTREN()/INTRDIS() might be called with INTs enabled.
This means another higher prio INT to the same cpu could attempt to
re-enter the critical region, but would spin waiting for the lock.  Since
it is the owner, it would deadlock.
1997-07-23 21:25:31 +00:00
Steve Passe
812e4da7a8 New simple_lock code in asm:
- s_lock_init()
 - s_lock()
 - s_lock_try()
 - s_unlock()

Created lock for IO APIC and apic_imen  (SMP version of imen)
 - imen_lock

Code to use imen_lock for access from apic_ipl.s and apic_vector.s.
Moved this code *outside* of mp_lock.

It seems to work!!!
1997-07-23 20:47:19 +00:00
Steve Passe
d9593fb979 Forced 32bit alignment of struct simple_lock in param.h.
Added declarations of new simple_lock data and functions to smp.h.
1997-07-23 20:42:16 +00:00
Steve Passe
740dc1b5f5 Forced 32bit alignment of struct simple_lock. 1997-07-23 20:40:52 +00:00
KATO Takenori
1cc4d2e950 Synchronize with sys/i386/isa/clock.c revision up to 1.97. 1997-07-23 11:28:39 +00:00
Steve Passe
919bdda1d4 Coded simple_lock and friends in asm. 1997-07-23 05:49:19 +00:00
Steve Passe
b1ba015c25 Added a missing semicolon, compile failed when I turned on simple_lock().
Evidently this has never been compiled before, NOT a good sign...
1997-07-22 23:19:48 +00:00
Steve Passe
87a6f31089 Last commit didn't take, operator error??? 1997-07-22 20:12:32 +00:00
Steve Passe
995655b397 Hid the existance of imen via a dump routine. 1997-07-22 19:57:30 +00:00
Steve Passe
2e12b456f5 Cleaned up an ugly printout. 1997-07-22 19:51:51 +00:00
Steve Passe
f2aeb7eaac Cleaned up the FPU init. 1997-07-22 16:49:54 +00:00
Doug Rabson
abfbc4005f Correct some dumb mistakes in the WebNFS stuff.
Submitted by:	bde
1997-07-22 15:35:57 +00:00
Doug Rabson
c4b3a97040 Allow NULL cookie verifiers for non-NULL offsets. This is needed for
Digital Unix boxes since they appear to always send null verifiers.
1997-07-22 15:35:15 +00:00
Jordan K. Hubbard
c1f94e717b Well, consensus seems very split on this so I talked it over with DG
and he says he's happy to see forward movement in aligning our defaults
with a 16 bit world, the 8 bit folk already being veterans by this
point who know how to use userconfig.

In any case, perhaps Warner will soon come to save us all with his Dynamic
Probing(tm) feature and this will all become totally moot in any case,
so it's probably not worth arguing about either way.
1997-07-22 08:33:52 +00:00
Bruce Evans
8b0597671f Quick and dirty (?) fix for noatime option. The WebNFS changes
broke it by using the same value for MNT_EXPUBLIC as for MNT_NOATIME.
Just use a different value for MNT_EXPUBLIC.
1997-07-22 08:03:19 +00:00
Steve Passe
9a9ad9f746 Enabled the FPU emilaute bit define: CR0_EM
Reviewed by:	Bruce Evans <bde@zeta.org.au>
1997-07-21 17:53:51 +00:00
Steve Passe
b9f415331e SMP code initializes the FPU of APs.
Suggested by:     Bruce Evans <bde@FreeBSD.ORG>
1997-07-21 17:03:22 +00:00
Bruce Evans
f6af917bec Oops, unremoved used #include. 1997-07-21 16:55:28 +00:00
Bruce Evans
4b9ea34eec Use soft_imask instead of SWI_MASK in the LKM version. SWI_MASK shouldn't
have been visible in LKMs, since it had the wrong value for the APIC_IO
case.

Removed unused #includes.
1997-07-21 16:50:46 +00:00
Bruce Evans
43ba542895 Store SWI_MASK in a variable so that LKMs can use it portably. 1997-07-21 16:43:48 +00:00
Bruce Evans
eae4afa6c0 Removed support for stale options.
Removed unused targets.  (Is sizetest necessary?  It wasn't run.)

Added boot.img to CLEANFILES.
1997-07-21 16:12:52 +00:00
Bruce Evans
2e9b23b0ba Added ${KMOD} to CLEANFILES. ${KMOD} gets created if you run `make load'. 1997-07-21 16:04:41 +00:00
KATO Takenori
684d56595c Synchronize with sys/i386/isa/npx.c revision 1.49. 1997-07-21 13:13:43 +00:00
KATO Takenori
b8b1bfc496 Synchronize with sys/i386/i386/microtime.s revision 1.26. 1997-07-21 13:12:45 +00:00
KATO Takenori
50902335e5 Synchronize with sys/i386/isa/clock.c revision up to 1.95. 1997-07-21 13:12:01 +00:00
KATO Takenori
062569821c Synchronize with sys/i386/isa/fd.c, if_ed.c, if_fe.c, lpt.c, mse.c,
npx.c, isa.c, sio.c, syscons.c and wd.c revisions 1.100, 1.117, 1.29,
1.61, 1.33, 1.48, 1.95, 1.173, 1.226 and 1.132, respectively.
1997-07-21 13:11:16 +00:00
KATO Takenori
2463359bc9 Synchronize with sys/i386/i386/machdep.c and trap.c revisions 1.253
and 1.101, respectively.
1997-07-21 13:04:54 +00:00
Steve Passe
e94493547b Disabled 2 static inlines:
- INTRGET()
 - INTRSET()

These were only used in if_ze.c (already removed) and npx.c.  The code
in npx.c has also been cleaned of all APIC code.
1997-07-21 08:20:07 +00:00
Steve Passe
3902c3ef1f Made the SMP case ignore the possibility of an INT13 interface.
This eliminates all the APIC code, and thus several routines that
would otherwise need to be made MP-safe.

Reviewed by:	 Bruce Evans <bde@zeta.org.au>
1997-07-21 07:57:50 +00:00
John Dyson
322d7a880b Fix a crash that has manifest itself while running X after the 4MB
page upgrades.
1997-07-21 01:21:25 +00:00
Steve Passe
4cb2abf6d8 Put in a "HEADS UP" concerning the 'SMP_TIMER_NC' option.
Disabled MATH_EMULATE, shouldn't ordinarily be needed for SMP.
1997-07-20 23:57:20 +00:00
Steve Passe
ba52d7ac34 Omit printout of imen, INTRGET() is not MP-safe yet... 1997-07-20 23:07:39 +00:00
Steve Passe
35b3c4a0e5 Developed a new strategy for handling the 8254/8259/APIC issue. 1997-07-20 19:41:38 +00:00
Steve Passe
c69ef9495b Developed a new strategy for handling the 8254/8259/APIC issue.
Enabled (by default) with "#define NEW_STRATEGY".
1997-07-20 19:40:34 +00:00
Steve Passe
3577278519 Minor cleanup.
Pass string arg to apic_dump.
Moved bootverbose printing of SMP enabled INTs from clock.c to autoconf.c
1997-07-20 18:05:20 +00:00
Steve Passe
0571e04aee Minor cleanup. 1997-07-20 18:02:59 +00:00
Steve Passe
03aad53304 Pass string arg to apic_dump. 1997-07-20 18:02:19 +00:00
Bruce Evans
ecd741d614 Removed unused #includes. 1997-07-20 16:21:36 +00:00
Bruce Evans
293a9e510c Removed unused #includes. 1997-07-20 16:06:08 +00:00
Bruce Evans
5f2d49adc9 Fixed data+bss limit (use the current rlimit instead of MAXDSIZ). 1997-07-20 14:21:36 +00:00
Bruce Evans
f71d35e402 Removed unused #includes. 1997-07-20 14:10:18 +00:00
KATO Takenori
3e80cd50df Removed unused #includes. 1997-07-20 13:02:05 +00:00
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
KATO Takenori
02f9294f2c Fixed the place of the `}' in comparam(). 1997-07-20 11:59:48 +00:00
Bruce Evans
6fdad28eb1 Removed unused #includes. 1997-07-20 11:58:40 +00:00
KATO Takenori
6c2fd1aa29 Synchronize with sys/i386/i386/microtime.s revision 1.25. 1997-07-20 11:56:48 +00:00
KATO Takenori
72561927af Synchronize with sys/i386/isa/clock.c revision up to 1.92. 1997-07-20 11:55:52 +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
50347d39df Removed unused #includes and a stale forward declaration. 1997-07-20 11:06:44 +00:00
Bruce Evans
28914c4644 Oops, I removed one too many #include. <machine/frame.h> was previously
included twice as a side effect of including unrelated headers, but I
removed the #include of one of the headers and will soon fix the nested
#include in the other.
1997-07-20 11:00:32 +00:00
Bruce Evans
ef0e1ab70c Hide definitions that depend on the APIC_IO option from LKMs so that LKMs
break properly if they use these definitions.

Use '#ifdef notyet' instead of '#if 0' to hide temporarily misplaced
declarations.
1997-07-20 10:35:50 +00:00
Bruce Evans
f7f084101e Fixed pedantic ANSI C errors:
- don't put a comma after the last element in enum declarations.
- don't declare static objects as extern.
1997-07-20 10:14:28 +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
Bruce Evans
9aa783b382 Removed unused #includes. 1997-07-20 09:39:51 +00:00
Bruce Evans
e5c70c95e1 Fixed bitrot in fpu LKMs. 1997-07-20 08:46:30 +00:00
Bruce Evans
e31521c3dd Removed unused #includes. 1997-07-20 08:37:24 +00:00
Bruce Evans
8f0169c8a8 Removed unused #includes. 1997-07-20 06:31:09 +00:00
Bruce Evans
96b89afc1d Disabled option SMP_TIMER_NC. It now conflicts with a default "option".
Moved description of sio 16650A flag to the sio section and rewrote the
description.  It was in the generic console flags section.

Added undocumented options CPU_UPGRADE_HW_CACHE and WLDEBUG.
1997-07-20 05:27:59 +00:00
Bill Fenner
548af2789b Remove sonewconn() macro kludge, introduced in 4.3-Reno to catch argument
mismatches.  Prototypes do a much better job these days.

Noticed by:	bde
1997-07-19 20:15:43 +00:00
Bill Fenner
407529c04f Remove crufty LBL ifdef that only applies to Suns.
Submitted by:	Craig Leres <leres@ee.lbl.gov>
1997-07-19 20:07:07 +00:00
Steve Passe
1dec61e7c0 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 04:00:35 +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
f5edb61526 Added #define APIC_PIN0_TIMER.
This define enables the code to ALWAYS run the 8254 timer thru the 8259 ICU.
It is ON by default.
It depricates the usage of "options SMP_TIMER_NC" in the config file.
1997-07-19 03:56:30 +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
e743fb99b1 Increased NIDT to 256 for case of SMP or APIC_IO. 1997-07-19 02:24:37 +00:00
Steve Passe
def1d1fe38 Added "options DDB", given the experimental nature of SMP... 1997-07-18 22:00:17 +00:00
Steve Passe
d2ecb616f2 Split TEST_CPUSTOP code into CPUSTOP_ON_DDBBREAK and mainline code. 1997-07-18 21:27:53 +00:00
Stefan Eßer
478f9549f4 Assign correct chip set register dump functions to Triton II device IDs.
PR:		i386/4092
Submitted by:	Steve Bauer <sbauer@rock.sdsmt.edu>
1997-07-18 19:47:23 +00:00
Stefan Eßer
01cb2f9493 Fix "unexpected phase change" interrupt handler: Do not access the
dstat register twice, pass the value read the first time to the fixup
code instead.

Submitted by:	Gerard Roudier <groudier@club-internet.fr>
1997-07-18 19:33:56 +00:00
Julian Elischer
076d0761c4 An actual fix for the routing default crashes that
1/ is compatible with the old route(1) in case needed.
2/ actually fixes the problem while vetting bad user input.
note: I have already fixed route(1) so the problem shouldn't occur.
if it does. use 0.0.0.0/0 instead of the word 'default' :)
1997-07-18 11:44:24 +00:00
Steve Passe
7bbd2262eb Made the printing of the APIC INTs depend on bootverbose. 1997-07-18 03:59:28 +00:00
Steve Passe
75c179003e printf cleanup. 1997-07-18 03:58:14 +00:00
John Dyson
78342719d6 Hopefully fix a few problems that could cause hangs in SMP mode.
1)	Make sure that the region mapped by a 4MB page is
	properly aligned.
2)	Don't turn on the PG_G flag in locore for SMP.  I plan
	to do that later in startup anyway.
3)	Make sure the 2nd processor has PSE enabled, so that 4MB
	pages don't hose it.

We don't use PG_G yet on SMP -- there is work to be done to make that
work correctly.  It isn't that important anyway...
1997-07-17 19:45:01 +00:00
KATO Takenori
6f51f3ff27 Synchronize with sys/i386/isa/sio.c revision 1.172. 1997-07-17 10:35:43 +00:00
KATO Takenori
bd8c35ce62 Synchronize with sys/i386/isa/npx.c revision 1.47. 1997-07-17 10:35:01 +00:00
Mike Smith
9a969a6e41 Fix Julian's fixed fix. Routing is weird.
We need to accept at least one sockaddr with zero length, in order
to be able to set the default route.

Suggested by:	Phone conversation with Julian (sleep well!)
1997-07-17 09:21:34 +00:00
Doug Rabson
f6b4c28555 Merge WebNFS support from NetBSD
Obtained from:	NetBSD
1997-07-17 07:17:33 +00:00
John Dyson
955bc15107 Add some support for the 16650 type UARTS. 1997-07-17 06:01:15 +00:00
John Dyson
5aaef07c50 Clean up some lint associated with the AIO code. 1997-07-17 04:49:43 +00:00
John Dyson
0a0a85b3e0 Add support for 4MB pages. This includes the .text, .data, .data parts
of the kernel, and also most of the dynamic parts of the kernel.  Additionally,
4MB pages will be allocated for display buffers as appropriate (only.)

The 4MB support for SMP isn't complete, but doesn't interfere with operation
either.
1997-07-17 04:34:03 +00:00
Steve Passe
7b28fdaa20 Turned OFF DEBUG_CPUSTOP as the default. This was necessary as kernels without
DDB failed to link for lack of db_printf().
1997-07-17 03:25:54 +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
Doug Rabson
2279b5f42f Merge WebNFS changes from NetBSD.
Obtained from:	NetBSD
1997-07-16 18:04:52 +00:00
Julian Elischer
ff6d0a5916 Bungled cut/paste leaves kernel with page faults..
(read all about it!)
1997-07-16 14:55:14 +00:00
KATO Takenori
0b980a17c8 Synchronize with sys/i386/isa/syscons.c and syscons.h revisions 1.225
and 1.31, respectively.
1997-07-16 13:55:59 +00:00
Doug Rabson
e775608178 Merge WebNFS changes from NetBSD.
Obtained from:	NetBSD
1997-07-16 09:06:30 +00:00
Julian Elischer
7f33a738c1 Finally track down the reason for some of my occasional kernel crashes.
Route(1) has a bug that sends a bad message to the kernel. The kernel
trusts it and crashes. Add some sanity checks so that
we don't trust the user quite as much any more.
(also add a comment in if_ethersubr.c)
1997-07-15 23:25:32 +00:00
Kazutaka YOKOTA
ce834215a7 Incorporated lots of fixes and suggestions from Bruce and changes to
facilitate the new saver loading/unloading notification interface
in syscons.

daemon_saver:
- M_NOWAIT was wrong, since NULL returns are not handled.  Just use
  M_WAITOK.
- use `ostype' instead of hard-coded "FreeBSD". Now there is no more
  hard-coded string! (But, who will run this screen saver on other
  OS?!)
- put macros and data declarations in a consistent order.
- -DDEAMON_ONLY and -DSHOW_HOSTNAME options added in the previous commit
  are removed. Options of this kind can go stale and no one notices
  because no one uses them. DEAMON_ONLY is just removed. SHOW_HOSTNAME
  is made default.

snake_saver:
- use `ostype' and `osrelease' as in the daemon saver. The string changes
  slightly - there was a hyphen after "FreeBSD"; now there is a space.
  (It is consistent with uname -a, like the daemon server already is.)

all screen savers:
- Use the new add_scrn_saver()/remove_scrn_saver() in syscons.c
  to declare loading/unloading of a screen saver. Removed reference
  to `current_saver' and the variable `old_saver' as they are not
  necessary anymore.
- The blank, fade and green screen savers manipulate VGA registers.
  Module loading should fail for non-VGA cards.
- `scrn_blanked' is consistently treated as a number/counter rather
  than boolean.
- Some savers touch `scp->start' and `scp->end' to force entire screen
  update when stopping themselves. This is unnecessary now because
  syscons.c takes care of that.
- cleared up many unused or unnecessary #include statements.
- Removed -DLKM from Makefiles.

YOU NEED TO RECOMPILE BOTH SCREEN SAVERS AND KERNEL AS OF THIS CHANGE.
1997-07-15 14:49:39 +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
KATO Takenori
16684c0e20 Oops, added popfl after trynexgen label.
PR:		4091
Submitted by:	Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
1997-07-15 11:07:32 +00:00
Steve Passe
253db5c717 Removed several "magic numbers". 1997-07-15 04:56:58 +00:00
Steve Passe
4ec664e4c1 Removed a stale "FIXME:". 1997-07-15 04:56:18 +00:00
Jordan K. Hubbard
50c6520b96 Add SYSVSHM by default. Nobody seems to have objected too strongly
to this when raised, and most were in favor of at least this option
(some also asked for semaphores and messages, but I'll leave that argument
for another time :).
1997-07-15 04:04:45 +00:00
Steve Passe
bb0be67512 Cleanup. 1997-07-15 03:28:53 +00:00
Steve Passe
665bb8fab0 Tighten up asm code for TEST_PRIO and other misc. things.
Use some new defines in place of "magic numbers".
1997-07-15 02:51:20 +00:00
Steve Passe
4e914a7eb7 Tighten up asm code for EOI access. 1997-07-15 02:49:21 +00:00
Steve Passe
4d29853614 New defines to eliminate "magic numbers" in various places. 1997-07-15 02:47:54 +00:00
Steve Passe
6c8a949030 Minor cleanup. 1997-07-15 02:46:37 +00:00
KATO Takenori
37f2e0347b Synchronize with sys/i386/isa/syscons.c revision 1.224. 1997-07-14 12:35:04 +00:00
KATO Takenori
6e4f1ea7d6 Synchronize with sys/i386/boot/biosboot/serial.S revision 1.9. 1997-07-14 12:34:01 +00:00
KATO Takenori
c39114cfcf Added CPU_BLUELIGHTNING_FPU_OP_CACHE and CPU_BLUELIGHTNING_3X.
Forgotten-by:	me.
1997-07-14 12:33:06 +00:00
KATO Takenori
4a2adb3998 Synchronize with sys/i386/conf/options.i386 revision 1.50. 1997-07-14 12:31:27 +00:00
Julian Elischer
0ec278018b two tiny typo's 1997-07-14 04:53:52 +00:00
Julian Elischer
5897e2693a remove annoying debug message 1997-07-14 04:30:22 +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
Bruce Evans
ffbce11fea 32-bit counters aren't large enough for 100+MHz clocks. Use 64-bit
counters.  `4' in GPROF4 and gprof4 now means 8.  gprof4 needs to be
recompiled to match the kernel.
1997-07-13 16:38:39 +00:00
Bruce Evans
ed1ab0dea2 Always mark st_ctime for update upon successful completion of
chown().  Previously, it wasn't marked for null chown()'s.  We
permit null chown()s as a special case of "appropriate privilege"
- everyone has enough priviilege to not change ids (this is a better
argument than the one I gave for rev.1.13, that null changes aren't
really changes).  However, POSIX.1 requires the update independently
of whether anything has changed.

Clear both the setuid and the setgid bits upon successful completion
of non-null chown()s by non-root.  Previously, the setuid bit was
only changed for non-null changes of the uid, etc.  POSIX.1 requires
clearing both unless the call was made by a process with "appropriate
privilege", in which case altering the bits is implementation-defined.
We define appropriate privilege as `process is root, or the change
is null', and the implementation-defined behaviour as not altering
the bits.   There is no interpretation that permits clearing only
one of the bits.

Reviewed by:	jdp
1997-07-13 16:26:40 +00:00
Bruce Evans
7e88aafca7 Use the correct size for a sector in the search for a label in
readdisklabel().  Sectors may be larger than DEV_BSIZE.
1997-07-13 15:53:20 +00:00
Bruce Evans
0dd8d85b1c Removed semicolon from the end of a #define. 1997-07-13 15:43:54 +00:00
Bruce Evans
3f9d0d120a Fixed comment about i_spare. 1997-07-13 15:40:31 +00:00
Bruce Evans
c3ed6aa9cd Added CPU_DIRECT_MAPPED_CACHE. 1997-07-13 15:26:54 +00:00
Bruce Evans
5f0539ec6c Saved a few bytes by omitting frame pointers, using byte-sized
instructions more (many cases were already intended to be byte-sized
but were missing prefixes so gas assembled them bogusly), and
rearranging a loop to test at the end.
1997-07-13 15:24:15 +00:00