Commit Graph

8439 Commits

Author SHA1 Message Date
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
KATO Takenori 4e329ed74c Synchronize with sys/i386/isa/clock.c revision 1.89. 1997-07-13 12:14:18 +00:00
KATO Takenori 604526fa72 Synchronize with following changes:
>  Revision  Changes    Path
>  1.11      +127 -1    src/sys/i386/boot/biosboot/bios.S
>  1.20      +6 -2      src/sys/i386/boot/biosboot/boot.h
>  1.24      +32 -5     src/sys/i386/boot/biosboot/io.c
1997-07-13 12:13:02 +00:00
Jordan K. Hubbard 17b8806498 Commit a long-forgotten tweak for building tags in /usr/src/sys. 1997-07-13 07:36:20 +00:00
Steve Passe 7503ccc1c8 new code to control other CPUs: stop_cpus()/restart_cpus()/_Xstopcpu
this code is controlled by smptests.h: TEST_CPUSTOP, OFF by default

new code for handling mixed-mode 8259/APIC programming without 'ExtInt'
this code is controlled by smptests.h: TEST_ALTTIMER, ON by default
1997-07-13 01:22:48 +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
Steve Passe c5f838abdb Many new test defines, including:
- TEST_CPUSTOP		adds stop_cpus()/restart_cpus(), OFF by default
 - TEST_ALTTIMER	new method for attaching 8259 PIC to APIC
			this method avoids 'ExtInt' programming, ON by default
 - TIMER_ALL		sends 8259/8254 timer INTs to all CPUs, ON by default
 - ASMPOSTCODExxx	code to display bytes to POST hardware, OFF by default
1997-07-13 01:15:30 +00:00
Steve Passe 409ba536dc Cleanup old stop_cpus/restart_cpus() cruft.
Leave TEST_TEST1 for now.
1997-07-13 01:07:57 +00:00
Peter Wemm f89d9d2d89 What the heck, declare the sysctlbyname() first arg const. 1997-07-12 11:12:41 +00:00
Peter Wemm 153bc8e29f Add a proto for sysctlbyname() 1997-07-12 11:04:25 +00:00
Joerg Wunsch f88ef34060 Make this compile again under -current. The modifications to io.c
and bios.S were small enough and have been merged back into their
respective files in biosboot/, conditionalized on CDBOOT.  Other
files might be merged at a later stage.

Caveat emptor: i cannot test this right now.
1997-07-12 10:23:31 +00:00
Joerg Wunsch c38b4f3b91 (Part #2, after the Internet link broke totally yesterday.)
This is the long-threatened ISO 9660 CD-ROM bootstrap code.

This work has been sponsored by Plutotech International, Inc (who paid
the initial work), and interface business GmbH (where i did most of
the work).  A big thanks also goes to Bruce Evans, for his continuing
help and answering my stupid questions.

The code is basically functioning, with the following caveats:

. Rock Ridge attributes are not yet supported.
. Only SCSI CD-ROMs are supported, since i fail to see any possibility
  to determine the drive type using BIOS functions.  (Even for hard disks,
  this determination is done by a big hack only.)
. El Torito specifies a lot of crap and useless misfeatures, but crucial
  things like the ability to figure out the CD TOC have been ``forgotten''.
  Thus, if you wanna boot a multisession CD, you need to know at which CD
  block your session starts, and need to speciffy it using the @ clause.

. None of the CD-ROM controllers i've seen so far implements the full
  El Torito specification at all.  Adaptec is probably the closest, but
  they miss on non-emulation booting (which would be the most logical
  choice for us).  Thus, the current code bloats the 7.5 KB boot code
  up to 1.44 MB, in order to fake a `floppy' image.

  If you wanna use it, specify this file as the boot image on the
  command-line of the mksiosfs command (option -b).

  Caveat emptor: some versions of the Adaptec BIOS might even fail to
  access the CD-ROM at all, using the BIOS functions.  I think i've
  notice this for ver 1.26, the code has been tested with ver 1.23.

The boot string is as follows:

        [@sess-start] [filename] [-flags]

sess-start      Extend # where the last session starts, measured in
                CD-ROM blocks.

filename        As usual, but the input is case-insensitive by now
                (since we  don't grok RR anyway).

flags           As usual, but -C (use CDROM root f/s) is default, so
                specifying -C will decactivate this option (which is
                probably not what you want :).

A lot of cleanup work is probably required, and some of the files
could/should be merged back to biosboot, perhaps made conditional on
some #ifdef.  The malloc implementation that comes with cdboot might
also be useful for kzipboot.  (I needed a malloc() since the root dir
ain't fixed in size on a CD.)

I've been testing all this with a 2.2-STABLE as the base for biosboot.
I don't expect too many surprises, although i know the biosboot stuff
has been changed a lot in -current lately.  I'm sure Bruce will
comment on all this here anyway. :-)
1997-07-11 05:52:41 +00:00
Joerg Wunsch 5ee8126ec8 This is the long-threatened ISO 9660 CD-ROM bootstrap code.
This work has been sponsored by Plutotech International, Inc (who paid
the initial work), and interface business GmbH (where i did most of
the work).  A big thanks also goes to Bruce Evans, for his continuing
help and answering my stupid questions.

The code is basically functioning, with the following caveats:

. Rock Ridge attributes are not yet supported.
. Only SCSI CD-ROMs are supported, since i fail to see any possibility
  to determine the drive type using BIOS functions.  (Even for hard disks,
  this determination is done by a big hack only.)
. El Torito specifies a lot of crap and useless misfeatures, but crucial
  things like the ability to figure out the CD TOC have been ``forgotten''.
  Thus, if you wanna boot a multisession CD, you need to know at which CD
  block your session starts, and need to speciffy it using the @ clause.

. None of the CD-ROM controllers i've seen so far implements the full
  El Torito specification at all.  Adaptec is probably the closest, but
  they miss on non-emulation booting (which would be the most logical
  choice for us).  Thus, the current code bloats the 7.5 KB boot code
  up to 1.44 MB, in order to fake a `floppy' image.

  If you wanna use it, specify this file as the boot image on the
  command-line of the mksiosfs command (option -b).

  Caveat emptor: some versions of the Adaptec BIOS might even fail to
  access the CD-ROM at all, using the BIOS functions.  I think i've
  notice this for ver 1.26, the code has been tested with ver 1.23.

The boot string is as follows:

	[@sess-start] [filename] [-flags]

sess-start	Extend # where the last session starts, measured in
		CD-ROM blocks.

filename	As usual, but the input is case-insensitive by now
		(since we  don't grok RR anyway).

flags		As usual, but -C (use CDROM root f/s) is default, so
		specifying -C will decactivate this option (which is
		probably not what you want :).

A lot of cleanup work is probably required, and some of the files
could/should be merged back to biosboot, perhaps made conditional on
some #ifdef.  The malloc implementation that comes with cdboot might
also be useful for kzipboot.  (I needed a malloc() since the root dir
ain't fixed in size on a CD.)

I've been testing all this with a 2.2-STABLE as the base for biosboot.
I don't expect too many surprises, although i know the biosboot stuff
has been changed a lot in -current lately.  I'm sure Bruce will
comment on all this here anyway. :-)
1997-07-10 21:58:43 +00:00
David Nugent f4e39ee7af Adds sysctl int for shutdown timeout.
Reviewed by:	Poul-Henning Kamp <phk@dk.tfs.com>
1997-07-10 11:44:42 +00:00
KATO Takenori 64d5f04e87 Synchronize with sys/i386/isa/isa.c revision 1.94. 1997-07-10 10:22:34 +00:00
KATO Takenori d6314be8f2 Synchronize with sys/i386/isa/syscons.c revision 1.223. 1997-07-10 10:21:47 +00:00
Wolfram Schneider d1515d7fc1 Delete $Id$ line from copyright.
Submitted: Bruce
1997-07-09 20:38:19 +00:00
Andrey A. Chernov 7ed3c9e661 Back out 'conflicts' with IRQs, remove intr_registered() decl 1997-07-09 18:08:15 +00:00
Andrey A. Chernov c6d372f6f3 Back out changes for 'conflicts' with IRQ, remove intr_registered() 1997-07-09 18:06:25 +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
KATO Takenori 9e0e115560 Synchronize with sys/i386/isa/syscons.c revision up to 1.222. 1997-07-09 14:43:19 +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
Steve Passe 9e3d5ec0b6 Screwed up again, gotta remember to turn off those debugs! 1997-07-09 05:00:47 +00:00
Steve Passe 17ebd4d085 General cleanup of APIC code.
stop_cpus()/restart_cpus() STILL not working!
1997-07-08 23:46:00 +00:00
Steve Passe afade3007a Minor cleanup of APIC code. 1997-07-08 23:42:02 +00:00
Steve Passe e94543eef4 added #define IPI_LEVEL 1997-07-08 23:39:02 +00:00
Steve Passe ad2e8ff493 General cleanup of APIC code.
stop_cpus/restart_cpus STILL not working!
1997-07-08 23:32:58 +00:00
Steve Passe a8988a70ce Reordered call to apic_initialize and setting invltlb_ok. 1997-07-08 23:25:40 +00:00
Andrey A. Chernov 29a4cf6d4d Remove 'conflicts' keyword from SB family devices, it is not
needed now. Uncomment awe0 device
1997-07-08 15:39:29 +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
Julian Elischer 57af792293 Don't add an item to the multicast linked list if it's already
on the list.
1997-07-07 17:36:06 +00:00
Steve Passe 791d2c2871 ifdef a TEST_CPUSTOP debug properly.
Submitted by:	 Kenneth Merry <ken@plutotech.com>
1997-07-07 16:34:22 +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
KATO Takenori f29c83010d Enables scmouse.
Submitted by:	H. Nokubi <h-nokubi@nmit.tmg.nec.co.jp>
             	T. Yamamoto <t-yamamt@ics.es.osaka-u.ac.jp>
             	M. Jinbo <karl@marcer.nagaokaut.ac.jp>
1997-07-07 12:47:36 +00:00
Steve Passe f055ec14b3 Opps, forgot to turn off the debugs... 1997-07-07 00:38:58 +00:00
Steve Passe 9746742be0 stop_cpus(), currently BROKEN! (turned off in smptests.h by default).
restart_cpus(), currently BROKEN! (turned off in smptests.h by default).
1997-07-07 00:06:51 +00:00
Steve Passe a9f5bd327a Preliminary support for Xspuriousint.
Preliminary support for stopcpus()/restartcpus().
1997-07-06 23:59:31 +00:00
Steve Passe 586f21e1cc Added some (temporary) macros for debugging.
New strategy for handling the TPR (Task Priority Register).
Test code to sync CPUs.
1997-07-06 23:50:12 +00:00
Steve Passe 69f0a823b2 Additional debugging functions and macros.
"spurious INTerrupt" support.
1997-07-06 23:40:15 +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 e154505673 #ifdef out debug for now... 1997-07-06 23:25:46 +00:00
Steve Passe 01bd6212ca Added a hook for a "spurious INTerrupt handler". 1997-07-06 22:11:26 +00:00
John Dyson 2244ea07dc This is an upgrade so that the kernel supports the AIO calls from
POSIX.4.  Additionally, there is some initial code that supports LIO.
This code supports AIO/LIO for all types of file descriptors, with
few if any restrictions.  There will be a followup very soon that
will support significantly more efficient operation for VCHR type
files (raw.)  This code is also dependent on some kernel features
that don't work under SMP yet.  After I commit the changes to the
kernel to support proper address space sharing on SMP, this code
will also work under SMP.
1997-07-06 02:40:43 +00:00
Peter Wemm 7a43952972 Send these files to the attic until they are in use for several reasons.
1: cvs and cvsup don't really support vendor branches other than 1.1.1.x,
this is on 1.1.2.x and causing problems in cvsup 'checkout mode', just the
same as cvs has problems interpreting dates. (cvs has "1.1.1" hard coded)
2: cvs 'rm'ing them takes them off the vendor branch and should hide the
above problems.
3: it's just clutter until the merge is done.
4: if the problem isn't sufficiently resolved by taking these off the
vendor branch, the files will have to be nuked and re-imported.
1997-07-05 15:44:29 +00:00
Bruce Evans 080cec3cc4 Fixed description of -cv. 1997-07-05 02:08:09 +00:00
KATO Takenori 4c290c2ae1 Synchronize with sys/i386/boot/kzipboot/boot.c revision 1.7. 1997-07-02 11:02:32 +00:00
KATO Takenori 8be046791d Synchronize with sys/i386/isa/wd.c revision 1.131. 1997-07-02 11:01:37 +00:00
KATO Takenori d9b8e3127c Synchronize with sys/i386/conf/options.i386 revision 1.49. 1997-07-02 11:00:56 +00:00
KATO Takenori 2a32753bfb Synchronize with sys/i386/isa/syscons.c revision 1.220. 1997-07-02 11:00:20 +00:00
Peter Wemm da6360324e Initial revision 1997-07-01 20:44:10 +00:00
John Polstra 66e39adc7c Fix a bug (apparently very old) that can cause a TCP connection to
be dropped when it has an unusual traffic pattern.  For full details
as well as a test case that demonstrates the failure, see the
referenced PR.

Under certain circumstances involving the persist state, it is
possible for the receive side's tp->rcv_nxt to advance beyond its
tp->rcv_adv.  This causes (tp->rcv_adv - tp->rcv_nxt) to become
negative.  However, in the code affected by this fix, that difference
was interpreted as an unsigned number by max().  Since it was
negative, it was taken as a huge unsigned number.  The effect was
to cause the receiver to believe that its receive window had negative
size, thereby rejecting all received segments including ACKs.  As
the test case shows, this led to fruitless retransmissions and
eventually to a dropped connection.  Even connections using the
loopback interface could be dropped.  The fix substitutes the signed
imax() for the unsigned max() function.

PR:		closes kern/3998
Reviewed by:	davidg, fenner, wollman
1997-07-01 05:42:16 +00:00
Bruce Evans 057b294dc0 Un-inline a call to spl0(). It is not time critical, and was only inline
because there was no non-inline spl0() to call.

Don't frob intr_nesting_level in idle() or cpu_switch().  Interrupts
are mostly disabled then, so the frobbing had little effect.
1997-07-01 01:34:30 +00:00
Bruce Evans b563e748a9 Added ifdefs so that this compiles when neither I586_CPU nor I586_CPU
is defined, or SMP is defined.  It is silly to configure PERFMON when
it can't work (it will be disabled at runtime), but I like to leave
the PERFMON configuration alone when I temporarily disable support for
modern CPUs to run regression tests.

Removed an unused #include.
1997-07-01 01:18:38 +00:00
Bruce Evans dc514523a7 Un-inline a call to spl0(). It is not time critical, and was only inline
because there was no non-inline spl0() to call.
1997-07-01 01:02:03 +00:00
Bruce Evans be69522eec Some staticized variables were still declared to be extern. 1997-07-01 00:54:37 +00:00
Bruce Evans 43a6378726 Removed extra definition of constty. It is defined in subr_prf.c. 1997-07-01 00:52:37 +00:00
Bruce Evans 48792cfc18 Don't cast function pointers to (void *). This will cause warnings.
They should be fixed when similar warnings for the general interrupt
attach routines are fixed.

Removed unused #include.
1997-07-01 00:45:45 +00:00
Bruce Evans 72ef571982 Don't depend <machine/cpufunc.h> including <sys/types.h>. 1997-07-01 00:29:33 +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
Bruce Evans 06daa05136 Enabled some SMP options. LINT is for testing that all code compiles
cleanly, so only negative options should be commented out.  Options
should have non-default values.
1997-07-01 00:14:39 +00:00
Bruce Evans 51d3fea92d Don't depend on gcc's feature of permitting returning void expressions
in functions returning void.
1997-07-01 00:08:34 +00:00
Bruce Evans 94e24bf0f5 Some staticized variables were still declared to be extern. 1997-06-30 23:54:50 +00:00
Bruce Evans b2b392c442 Don't depend on gcc's feature of interpreting `int foo(c) char c; ...'
as `int foo(char c) ...' if there is a bogus prototype `int foo(char c);'
in scope.
1997-06-30 23:49:17 +00:00
Bruce Evans ed2be8eabe Removed temporary SMP header fix. 1997-06-30 23:37:54 +00:00
Kazutaka YOKOTA 5d3b146552 options.i386:
- Added the psm options PSM_HOOKAPM and PSM_RESETAFTERSUSPEND.

LINT:
- Added the psm options PSM_HOOKAPM and PSM_RESETAFTERSUSPEND.
- Added comments on the flag 0x20 for syscons.
- Clarified descriptions on the flags (0x02, 0x04) regarding the cursor
  shape in syscons.
1997-06-30 14:37:43 +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
KATO Takenori da29c98f76 Synchronize with sys/i386/isa/syscons.c and syscons.h revisions 1.219
and 1.30, respectively.
1997-06-30 10:00:47 +00:00
KATO Takenori 89a8492f8f Synchronize with sys/i386/i386/machdep.c revision 1.252. 1997-06-30 09:58:39 +00:00
KATO Takenori bce20da1b3 Synchronize with sys/i386/conf/Makefile.i386 and files.i386 revisions
1.100 and 1.166, respectively.
1997-06-30 09:57:33 +00:00
Andrey A. Chernov 32721aad4f dev->id_flags --> flags
(not compiles otherwise)
1997-06-29 22:23:32 +00:00
Bruce Evans e747e4bcc1 Updated generated files (makesyscalls.sh changed). Only sysproto.h
really changed.
1997-06-29 17:47:32 +00:00
Bruce Evans 7a7bc7628c Don't generate unused nested #include of <sys/aio.h>. 1997-06-29 17:39:57 +00:00
Bruce Evans 1013a13daf Fixed the fix for not using -fomit-frame-pointer with -pg. The previous
fix stopped it being used in all cases, because substitution on unset
variables does not work.

When profiling, put -malign-functions=4 in CFLAGS instead of in PROF.
This fixes the histogram counts for profiling support functions.  It
gives bogus but harmless extra alignment for genassym etc.
1997-06-29 16:39:11 +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
Steve Passe 31d3baa2e0 Initialize private variable other_cpus during AP boot. 1997-06-27 23:38:32 +00:00
Steve Passe b7f7f066f6 Added POST code output to various points of the startup code.
General cleanup.

New functions to stop/start CPUs via IPIs:

 - int stop_cpus( u_int map );
 - int restart_cpus( u_int map );

Turned off by default, enabled via smptests.h:TEST_CPUSTOP.
Current version has a BUG, perhaps a deadlock?
1997-06-27 23:33:17 +00:00
Steve Passe b1c3894d1b Experimental calls to stop_cpus()/restart_cpus() within breakpoint calls.
Turned off by default in smptests.h.
1997-06-27 23:24:38 +00:00
Steve Passe 3984ec7e1f Added other_cpus to CPU private page.
This variable is a bitmap showing all CPUs present EXCEPT the CPU
owning the variable.  In other words, it is equal to the global bitmap
'all_cpus' minus its own bit.
1997-06-27 23:19:43 +00:00
Steve Passe 734d28f8dd Preliminaries for stop_cpus()/restart_cpus().
Both are turned off by default.

Added macro for displaying POST codes from kernel.
1997-06-27 23:12:31 +00:00
Steve Passe 4ef5e4e12c Program lint1 to handle NMIs.
Till now NMIs would be ignored.  Now an NMI is caught by the BSP.
APs still ignore NMI, am working on code to allow a CPU to stop other CPUs
via an IPI.
1997-06-27 22:27:18 +00:00
Steve Passe 0eaccbadd9 Added fields to the LVT1/2 group. 1997-06-27 22:13:50 +00:00
Justin T. Gibbs d144ffea1f Modify my copyright notice to allow the sequencer to be used with GPLed
software (aka Linux).
1997-06-27 19:39:34 +00:00
Justin T. Gibbs f68f348b20 Modify my copyright notice to allow the sequencer to be used with GPLed
software (aka Linux).

Fix a few bugs in the sequencer assembler.

Make it easy to compiler the assembler with debugging turned on.
1997-06-27 19:38:56 +00:00
Justin T. Gibbs 374114db56 KNF cleanup. 1997-06-27 19:36:27 +00:00
Bill Paul de38397ecf Fix a condition where nfs_statfs() can precipitate a panic. There is
code that says this:

        nfsm_request(vp, NFSPROC_FSSTAT, p, cred);
        if (v3)
                nfsm_postop_attr(vp, retattr);
        if (!error)
                nfsm_dissect(sfp, struct nfs_statfs *, NFSX_STATFS(v3));

The problem here is that if error != 0, nfsm_dissect() will not be
called, which leaves sfp == NULL. But nfs_statfs() does not bail out
at this point: it continues processing until it tries to dereference
sfp, which causes a panic. I was able to generate this crash under
the following conditions:

1) Set up a machine as an NFS server and NFS client, with amd running
   (using NIS maps). /usr/local is exported, though any exported fs
   can can be used to trigger the bug.
2) Log in as normal user, with home directory mounted from a SunOS 4.1.3
   NFS server via amd (along with a few other NFS filesystems from same
   machine).
3) Su to root and type the following:
   # mount localhost:/usr/local /mnt
   # df

To fix the panic, I changed the code to read:

        if (!error) {
                nfsm_dissect(sfp, struct nfs_statfs *, NFSX_STATFS(v3));
        } else
                goto nfsmout;

This is a bit kludgy in that nfsmout is a label defined by the nfsm_subs.h
macros, but these macros are themselves more than a little kludgy. This
stops the machine from crashing, but does not fix the overall bug: 'error'
somehow becomes 5 (EIO) when a statfs() is performed on the locally mounted
NFS filesystem. This seems to only happen the first time the filesystem
is accesed: on subsequent accesses, it seems to work fine again.

Now, I know there's no practical use in mounting a local filesystem
via NFS, but doing it shouldn't cause the system to melt down.
1997-06-27 19:10:46 +00:00
Steve Passe 0eb9918b17 Removed '#include <machine/smptests.h>' line, no longer needed. 1997-06-27 18:29:55 +00:00
Tor Egge b747f8bce4 Fill in some extra fields in the eproc structure. gdb uses this information
to determine where the data segment in core dumps should be mapped.
Reviewed by:	Peter Wemm <peter@spinner.dialix.com.au>
1997-06-27 15:42:05 +00:00
Peter Wemm 006ad618b8 Don't accept insane values for SO_(SND|RCV)BUF, and the low water marks.
Specifically, don't allow a value < 1 for any of them (it doesn't make
sense), and don't let the low water mark be greater than the corresponding
high water mark.

Pre-Approved by: wollman
Obtained from: NetBSD
1997-06-27 15:28:54 +00:00
KATO Takenori 4962d93866 Added CPU_DIRECT_MAPPED_CACHE option which sets L1 cache in direct
mapped mode on Cyrix 486DLC box.
1997-06-27 13:46:19 +00:00
John Hay 8f65b5944d Removed the #ifdef IPXERRORMSGS'ed code. Fix a lot of style errors that I
introduced with the previous commit.
Style fixes Submitted by:	Bruce Evans <bde@FreeBSD.ORG>
1997-06-26 19:36:03 +00:00
Alexander Langer ee97e537f7 More comment cleanup. 1997-06-26 17:12:59 +00:00
Alexander Langer 09c8ff4a78 Typo police. 1997-06-26 16:13:56 +00:00
Alexander Langer 2c39c8177b Style fix my previous commit. 1997-06-26 16:12:53 +00:00
KATO Takenori 9679e98125 Synchronize with sys/i386/isa/clock.c and isa.c revisions 1.88 and
1.93, respectively.
1997-06-26 14:49:25 +00:00
Tor Egge b672570754 Back out a bad commit. 1997-06-26 02:04:34 +00:00
Tor Egge 932c8934e8 Clear nfs_iodwant[myiod] when the nfsiod process exits due to a signal. 1997-06-25 21:07:26 +00:00
Steve Passe 8b16756603 Merged/renamed functions:
- get_isa_apic_mask() -> isa_apic_mask()
 - get_isa_apic_irq() && get_eisa_apic_irq() -> isa_apic_pin()
 - get_pci_apic_irq() -> pci_apic_pin()
1997-06-25 21:01:52 +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
Steve Passe 89e4e0c098 Modified to declare merged/renamed functions:
- get_isa_apic_mask() -> isa_apic_mask()
 - get_isa_apic_irq() && get_eisa_apic_irq() -> isa_apic_pin()
 - get_pci_apic_irq() -> pci_apic_pin()
1997-06-25 20:59:15 +00:00
Steve Passe 91f7398bca Modified to use renamed get_pci_apic_irq() -> pci_apic_pin() function. 1997-06-25 20:56:29 +00:00
Tor Egge 7bcc0f3d66 Allow the kernel configuration file to override the amount of memory
available to the kernel (VM_KMEM_SIZE). The default (32 MB) is too low
when having 512 MB or more physical memory in a server environment. This is
relevant on systems where "panic: kmem_malloc: kmem_map too small" is a
problem.
1997-06-25 20:18:58 +00:00
Tor Egge a4ec81c7d0 Allow kernel configuration file to override PMAP_SHPGPERPROC. The default
value (200) is too low in some environments, causing a fatal
"panic: get_pv_entry: cannot get a pv_entry_t". The same panic might
still occur due to temporary shortage of free physical memory
(cf. PR i386/2431).
1997-06-25 20:07:50 +00:00
Tor Egge 9facf4a0d9 Block some interrupts during the call to pmap_zero_page in
vm_page_zero_idle. This fixes some occurences of the problem
reported in PR kern/3216: "panic: pmap_zero_page: CMAP busy"
1997-06-25 19:49:45 +00:00
Tor Egge 7a1d27b301 Introduce an advisory exclusive lock on the scsi link structure.
Change sd_open, sd_close and sd_ioctl to use this lock to ensure
serialization of some critical operations, thus avoiding some
race conditions. Ideas picked from NetBSD (ccd and sd devices).
This fixes one of the problems noted in PR kern/3688.
Reviewed by:	"Justin T. Gibbs" <gibbs@plutotech.com>
1997-06-25 19:07:43 +00:00
Doug Rabson 3d0f68fc7d Avoid small synchronous writes when an application does lots of random-access
short writes within a block (e.g. ld).
1997-06-25 08:35:41 +00:00
Doug Rabson 9069581b0e Make nfs_lookup return a NULLVP on error so that DIAGNOSTIC kernels don't
panic.
1997-06-25 08:32:33 +00:00
Joerg Wunsch e16ed08126 Don't ever allow lowering the securelevel at all. Allowing it does
nothing good except of opening a can of (potential or real) security
holes.  People maintaining a machine with higher security requirements
need to be on the console anyway, so there's no point in not forcing
them to reboot before starting maintenance.

Agreed by:	hackers, guido
1997-06-25 07:31:47 +00:00
Sean Eric Fagan 61ef57aaf2 Do The Right Thing when an iBCS2 program does getgroups(0, whatever) -- we
were returning EFAULT, when it is a completely acceptable thing to do.
Also, at the same time, be a *bit* optimizing and don't allocate any
"stackgrap" memory if we're not going to use it.

This is another Oracle-discovered problem.

Submitted by:	Steven Wallace
1997-06-25 01:01:21 +00:00
John Hay 5faa3121a9 Add tickadj to struct clockinfo, like NetBSD and OpenBSD.
NOTE: libc, time, kgmon and rpc.rstatd will have to be recompiled.
1997-06-24 18:21:09 +00:00
Tor Egge 3b5d3246bf Ensure that the boot CPU honours write protection in kernel mode.
This fixes one of the problems noted in PR kern/3688.
1997-06-24 17:26:07 +00:00
Kazutaka YOKOTA f4863d1a23 Take the OS release string from the kernel variable `osrelease'
rather than hard-code it in the message text. Optinally include
the host name in the message if SHOW_HOSTNAME is defined.

The origianl idea and sample code submitted by Angelo Turetta
<ATuretta@stylo.it>.
1997-06-24 12:43:18 +00:00
KATO Takenori 7367854ebc Recognize AMD K5 PR166 and PR200 CPUs. 1997-06-24 09:45:35 +00:00
David Greenman 358311fe63 Killed bogus kernacc() call in malloc() DIAGNOSTIC code. kernacc() by
it's nature, locks the kernal_map, and this is deadly if kernal_map had
been locked previous to a (net) interrupt.
1997-06-24 09:41:00 +00:00
Steve Passe ee889b3ba0 Fix calculation of initial mplock value.
We now use LOGICAL, not PHYSICAL, IDs to calculate the mplock.
1997-06-24 07:48:02 +00:00
Steve Passe afbe6f7b6e Fixed breakage for "default" configurations in mptable_pass1(). 1997-06-24 06:55:30 +00:00
Tor Egge 208d433777 Don't try upgrading an existing exclusive lock in vm_map_user_pageable.
This should close PR kern/3180.
Also remove a bogus unconditional call to vm_map_unlock_read in
vm_map_lookup.
1997-06-23 21:51:03 +00:00
KATO Takenori 879210125e Synchronize with following changes:
>  Revision  Changes    Path
>  1.250     +1 -18     src/sys/i386/i386/machdep.c
>  1.48      +1 -7      src/sys/i386/conf/options.i386
>  1.251     +19 -46    src/sys/i386/i386/machdep.c
>  1.24      +2 -6      src/sys/i386/i386/microtime.s
>  1.100     +4 -15     src/sys/i386/i386/trap.c
>  1.46      +6 -7      src/sys/i386/isa/npx.c
1997-06-23 09:35:47 +00:00
KATO Takenori 5603173abd Synchronize with sys/i386/i386/userconfig.c revision 1.86. 1997-06-23 09:31:58 +00:00
KATO Takenori be889e159d Synchronize with sys/i386/isa/syscons.c revision 1.217. 1997-06-23 09:31:03 +00:00
Sean Eric Fagan c6d139318e For the xenix_ftime() routine, don't use the native version of the struct --
the XENIX version is packed, and two bytes smaller than ours.  So, define
the structure, and have it packed.  I used the __attribte__((packed))
modifier for this; I could also have surrounded the struct definition with
#pragma pack(2) -- but that would have meant making ibcs2_timeb's definition
outside the function.  This may need to be revisited if we ever want to
compile with a compiler other than gcc.  (I also used 'unsigned long'
instead of 'time_t' because I am writing to match an external specification
-- and the definition of time_t could change.)

Reviewed by:	Steven Wallace
1997-06-22 19:04:03 +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
Peter Wemm 3b18caba29 Kill some stale leftovers from the earlier attempts at SMP per-cpu pages 1997-06-22 15:47:16 +00:00
Mike Smith 0231d9ebb6 From the submitted patch :
The kernel with USERCONFIG_BOOT and VISUAL_USERCONFIG option presents
the user the kernel configuration menu upon boot.

The user can navigate the menu with cursor keys. I think it would be
nice if the user can navigate and select a menu item with regular keys
as well, so that the user who is using a serial console which is not
so capable of esc sequences still can choose a menu item.

With the following patch we can select an item by typing an item
number, 1, 2, or 3, or mnemonic `s' to skip UserConfig, 'v' to enter
the visual mode, and `c' to start the CLI mode. `p', `u', `n', and `d'
will move cursor up and down.

Submitted by:	yokota
1997-06-22 13:51:04 +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
Peter Wemm 2adb88c953 Superceded by dc21040reg.h 1997-06-22 09:50:09 +00:00
Peter Wemm 12e96047fa Initial set of patches to get it to compile on >= 3.0. Most of the
changes relative to the 2.2 compatable version are include file
related, the new multicast interface (!) and the new PCI interface.

This should work "as-is" but has not been tested (I have not been able
to get a dc21x4x based card for testing).
1997-06-22 09:48:42 +00:00
Peter Wemm e5d6c2c9e7 Clean import of if_de.c as of 970513, if_de.c rev 1.86. This should
have optional if_media support.

Obtained from: Matt Thomas via http://www.3am-software.com/
1997-06-22 09:36:50 +00:00
Peter Wemm 172d6524df This commit was generated by cvs2svn to compensate for changes in r26790,
which included commits to RCS files with non-trunk default branches.
1997-06-22 09:32:32 +00:00
Peter Wemm cb031f1c21 Clean import of Matt Thomas's if_de.c driver as of 970508, rev 1.85. The
slightly later one with optional if_media will be imported shortly as well.

Obtained from: Matt Thomas via http://www.3am-software.com/
1997-06-22 09:32:32 +00:00
Peter Wemm 1aa753b506 Clean import of Matt Thomas's if_de.c driver as of 970508, rev 1.85. The
slightly later one with optional if_media will be imported shortly as well.

Obtained from: Matt Thomas via http://www.3am-software.com/
1997-06-22 09:32:32 +00:00
John Dyson 3c631446d3 Remove a window during running down a file vnode. Also, the OBJ_DEAD
flag wasn't being respected during vref(), et. al.  Note that this
isn't the eventual fix for the locking problem.  Fine grained SMP
in the VM and VFS code will require (lots) more work.
1997-06-22 03:00:24 +00:00
Brian Somers 3bb3b0463e Fix this damn mbuf with a negative m_len. It turns
out to be a problem with VJ header compression.
davidg spotted this in usr.sbin/ppp/slcompress.c
a while ago, but I believe gave the wrong reasons -
it's too easy to reproduce !  The only scenario that
I've been able to reproduce the problem under is when
m_len is *exactly* 40 !  So go figure !

PR:		3749
Submitted elsewhere by:	davidg
Obtained from: usr.sbin/ppp/slcompress.c
1997-06-22 02:19:53 +00:00
Bruce Evans c8f8a520f6 Fixed va_arg() to work for small args (as in stdarg.h). 1997-06-21 16:20:55 +00:00
Alexander Langer 8a77722ad7 Block all write operations to /proc/1/* when securelevel > 0.
The additional check in procfs_ctl.c could be backed out, but
I'm leaving it in for good measure.

Reviewed by:	Theo de Raadt <deraadt@OpenBSD.org>
1997-06-21 16:09:49 +00:00
Bruce Evans ce93f47a1e Don't attempt to generate errors for unpromoted types in va_arg(),
since it is impossible to distinguish unpromoted types from small
(struct) types.  Renamed __va_promote() to __va_size() since it is
related to sizes of args on the stack and not to promotion.

PR:		3884
Submitted by:	mostly by arnej@math.ntnu.no (Arne Henrik Juul)
Obtained from:	name of__va_size and some parentheses fixes from NetBSD
1997-06-21 15:45:13 +00:00