Commit Graph

1397 Commits

Author SHA1 Message Date
Bruce Evans
ccea0a158a Check for irq conflicts even if conflicts are allowed. Conflicting
irqs can't work (at best, the first one attached wins).  It used to
be necessary to skip this check because of bogus irqs in the sound
drivers, but the sound drivers have been fixed, except possibly the
OSS ones.
1997-08-25 22:52:59 +00:00
Bruce Evans
10a1aa05e8 Finished (?) support for DISABLE_PSE option. 2-3MB of kernel vm was sometimes
wasted.

Fixed type mismatches for functions with vm_prot_t's as args.  vm_prot_t
is u_char, so the prototypes should have used promoteof(u_char) to match
the old-style function definitions.  They use just vm_prot_t.  This depends
on gcc features to work.  I fixed the definitions since this is easiest.
The correct fix may be to change vm_prot_t to u_int, to optimize for time
instead of space.

Removed a stale comment.
1997-08-25 21:53:01 +00:00
Bruce Evans
2a2968a896 Removed a bogus comment. 1997-08-25 21:28:08 +00:00
Peter Wemm
29f886b18b s/.align/.p2align/ so that we get the same results when building elf
objects (the tools are a bit better)
1997-08-25 10:57:38 +00:00
Steve Passe
8ee0110a44 A clean fix for the spl "deadlock before smp_active" problem.
Added a new variable, 'bsp_apic_ready', which is set as soon as the bootstrap
CPU has initialized its local APIC.  Conditionalize the GENSPLR functions
to call ss_lock ONLY after bsp_apic_ready is TRUE;  This should prevent
any problems with races between the time the 1st AP becomes ready and the
time smp_active is set.
1997-08-24 20:33:32 +00:00
Steve Passe
886e789627 The last of the encapsolation of cpl/spl/ipending things into a critical
region protected by the simplelock 'cpl_lock'.

Notes:

 - this code is currently controlled on a section by section basis with
   defines in machine/param.h.  All sections are currently enabled.

 - this code is not as clean as I would like, but that can wait till later.

 - the "giant lock" still surrounds most instances of this "cpl region".
   I still have to do the code that arbitrates setting cpl between the
   top and bottom halves of the kernel.

 - the possibility of deadlock exists, I am committing the code at this
   point so as to exercise it and detect any such cases B4 the "giant lock"
   is removed.
1997-08-24 00:05:37 +00:00
Bruce Evans
b1037dcd53 #include <machine/limits.h> explicitly in the few places that it is required. 1997-08-21 20:33:42 +00:00
Philippe Charnier
40d5099441 Revert my previous commit about using CS_SECURE macro.
Requested by:	Bruce.
1997-08-21 06:33:04 +00:00
Steve Passe
4a73d99f7e Made PEND_INTS default.
Made NEW_STRATEGY default.
Removed misc. old cruft.

Centralized simple locks into mp_machdep.c
Centralized simple lock macros into param.h

More cleanup in the direction of making splxx()/cpl MP-safe.
1997-08-21 05:08:25 +00:00
Steve Passe
7b185ef809 Preperation for moving cpl into critical region access.
Several new fine-grained locks.
New FAST_INTR() methods:
 - separate simplelock for FAST_INTR, no more giant lock.
 - FAST_INTR()s no longer checks ipending on way out of ISR.
sio made MP-safe (I hope).
1997-08-20 05:25:48 +00:00
Steve Passe
5996461961 Preperation for moving cpl into critical region access.
Several new fine-grained locks.
Control of new FAST_INTR() methods.
1997-08-20 05:22:33 +00:00
Philippe Charnier
15f3549108 Use CS_SECURE macro.
Reviewed by:	John Dyson
1997-08-18 06:58:59 +00:00
Steve Passe
7e48002a92 Removed volatile from arg to simple_lock & friends. 1997-08-18 03:35:59 +00:00
Steve Passe
b5cdece0a9 The promised "better fix" for "Trap 9 When Boot SMP" problem.
We now tsleep() in kthread_init() between start_init()
and prepare_usermode() while waiting for ALL the idle_loop()
processes to come online.

Debugged & tested by:   "Thomas D. Dean" <tomdean@ix.netcom.com>

Reviewed by:    David Greenman <dg@root.com>
1997-08-15 02:34:32 +00:00
Steve Price
1393383a2e Add parentheses because == has higher precedence than &.
PR:		i386/4225
Submitted by:	Frank MacLachlan <fpm@n2.net>
1997-08-13 02:40:06 +00:00
John Dyson
0b6e0f74f9 Back out a part of the disk scheduling "improvements" :-(. Let me know
how the system works now!!!
1997-08-12 19:07:42 +00:00
Steve Passe
a5e8237d2a Oops, fix breakage to UP kernel. 1997-08-10 21:18:01 +00:00
Steve Passe
e7802310d2 Added trap specific lock calls: get_fpu_lock, etc.
All resolve to the GIANT_LOCK at this time, it is purely a logical partitioning.
1997-08-10 20:59:07 +00:00
Steve Passe
cb02d4da35 Cheap fix for kern/4255.
If the problem is seen this fix suggests a compile-time work-around then panics.
1997-08-10 19:32:38 +00:00
Steve Passe
7acc960834 Some fixes towards making "default configs" work again.
Still not fixed, no idea why.

Debug help from: "Thomas D. Dean" <tomdean@ix.netcom.com>
1997-08-09 23:01:03 +00:00
Steve Passe
8a5da00284 Minor conditionalization of XXX_MPLOCK on PEND_INTS. 1997-08-09 22:52:59 +00:00
Steve Passe
6354231eaa Added 'lock' instruction before 3 places that update ipending.
This may or may not fix the "high IO freezes SMP kernel" problem.
1997-08-09 19:40:28 +00:00
John Dyson
c0ecffb96b Modify the scheduling policy to take into account disk I/O waits
as chargeable CPU usage.  This should mitigate the problem of processes
doing disk I/O hogging the CPU.  Various users have reported the
problem, and test code shows that the problem should now be gone.
1997-08-09 10:13:32 +00:00
John Dyson
a62e455e42 A couple of missing doscmd header files. Messed up again. Now can
compile the kernel!!!
Submitted by:	Jonathan Lemon <jlemon@americantv.com>
1997-08-09 04:55:05 +00:00
John Dyson
48a09cf276 VM86 kernel support.
Work done by BSDI, Jonathan Lemon <jlemon@americantv.com>,
	Mike Smith <msmith@gsoft.com.au>, Sean Eric Fagan <sef@kithrup.com>,
	and probably alot of others.
Submitted by:	Jnathan Lemon <jlemon@americantv.com>
1997-08-09 00:04:06 +00:00
John Dyson
d3d1eb995b Fix the DDB breakpoint code when using the 4MB page support. 1997-08-07 05:15:52 +00:00
John Dyson
f1c1c5b5a4 More vm_zone cleanup. The sysctl now accounts for items better, and
counts the number of allocations.
1997-08-07 03:52:55 +00:00
Peter Wemm
2a1b9e9bc5 printf does not understand %hd in the kernel 1997-08-06 11:08:01 +00:00
John Dyson
0d65e566b9 Another attempt at cleaning up the new memory allocator. 1997-08-05 22:24:31 +00:00
John Dyson
b79933ebfa Fix some bugs, document vm_zone better. Add copyright to vm_zone.h. Use
the new zone code in pmap.c so that we can get rid of the ugly ad-hoc
allocations in pmap.c.
1997-08-05 22:07:27 +00:00
Mike Smith
c7a2b294f0 memcmp -> bmcp
Submitted by:	smp, bde
1997-08-05 01:38:19 +00:00
John Dyson
b25b051bfd Modify pmap to use our new memory allocator. 1997-08-05 01:32:05 +00:00
John Dyson
f6363c8442 Slightly reorder some operations so that the main processor gets global
mappings early on.
1997-08-05 01:02:14 +00:00
John Dyson
de5858ab42 Remove the PMAP_PVLIST conditionals in pmap.*, and another unneeded define. 1997-08-05 00:42:01 +00:00
John Dyson
3075778b63 Get rid of the ad-hoc memory allocator for vm_map_entries, in lieu of
a simple, clean zone type allocator.  This new allocator will also be
used for machine dependent pmap PV entries.
1997-08-05 00:02:08 +00:00
Steve Passe
570dbb53e0 Eliminate frequent silo overflows by restoring the TEST_LOPRIO code.
This code was eliminated when the PEND_INTS algorithm was added.  But it was
discovered that PEND_INTS only worsen latency for FAST_INTR() routines,
which can't be marked pending.

Noticed & debugged by:	dave adkins <adkin003@gold.tc.umn.edu>
1997-08-04 17:31:43 +00:00
Mike Smith
b0ed9cd762 Nuke the nonexistend pad bytes from the end of the DMI header structure. 1997-08-04 03:31:23 +00:00
Mike Smith
5e73f3aed8 Correctly checksum the DMI signature structure. Format the BSD revision
number therein.

Report from:	dave adkins <adkin003@gold.tc.umn.edu>
1997-08-04 03:29:05 +00:00
Mike Smith
d561028dac Support functions for working with x86 PC-architecture BIOS.
Initially functionality is confined to 32-bit BIOS functions, however
it is envisioned that BIOS support may be enlisted for other
activities in the future.
1997-08-01 06:07:13 +00:00
Mike Smith
8522770025 Support for PC BIOS functions. 1997-08-01 06:04:59 +00:00
Steve Passe
98bf2bffca Fixed imen declaration.
Submitted by:	Bruce Evans <bde@zeta.org.au>
1997-07-31 17:28:20 +00:00
Steve Passe
da9f018228 Converted the TEST_LOPRIO code to default.
Created mplock functions that save/restore NO registers.
Minor cleanup.
1997-07-31 05:43:05 +00:00
Steve Passe
d1283d9c9d Converted the TEST_LOPRIO code to default.
removed PEND_INTS 1st try
direct call to MPtrylock
1997-07-31 05:42:06 +00:00
Steve Passe
2e6a5b15a9 Converted the TEST_LOPRIO code to default. 1997-07-31 05:39:49 +00:00
Mike Smith
84685adb57 Return to using disable/enable_intr() for guarding DMA register access.
Mask the read value from the count register in order to return zero correctly
after TC, as per intel datasheet : "If it is not autoinitialised, this
register will have a count of FFFFH after TC"
1997-07-29 05:24:36 +00:00
Mike Smith
f5f607a03e Pedant attack! Use variable names consistent with discourse in
comments.  Remove reduntant extra addition that was unncessary, and
unneeded mask (asuming inb works correctly).

Submitted by:	Stephen McKay <syssgm@dtir.qld.gov.au>
1997-07-28 09:13:11 +00:00
Mike Smith
53f83ec34c Use disable_intr() / read/write_eflags() to ensure that interrupt
handlers don't skew the results of isa_dmastatus.  The function can be
safely called with interrupts disabled.

Submitted by:	Stephen McKay <syssgm@dtir.qld.gov.au>
1997-07-28 07:49:40 +00:00
Steve Passe
412f3e4d71 Modified the PEND_INTS algorithm to fix the ISA INT loss problem.
Noticed by:	dave adkins <adkin003@gold.tc.umn.edu> and others.
1997-07-28 03:59:54 +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
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
KATO Takenori
4877e978b3 Treat 6x86MX CPU as 686-class CPU instead of 586-class CPU. 1997-07-24 14:19:25 +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
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
919bdda1d4 Coded simple_lock and friends in asm. 1997-07-23 05:49:19 +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
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
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
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
35b3c4a0e5 Developed a new strategy for handling the 8254/8259/APIC issue. 1997-07-20 19:41:38 +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
f71d35e402 Removed unused #includes. 1997-07-20 14:10:18 +00:00
Bruce Evans
50347d39df Removed unused #includes and a stale forward declaration. 1997-07-20 11:06:44 +00:00
Bruce Evans
e31521c3dd Removed unused #includes. 1997-07-20 08:37:24 +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
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
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
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
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
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
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
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
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
Andrey A. Chernov
d80e841377 Back out my changes with 'conflicts' keyword for IRQs,
sounddriver fixed now.
1997-07-09 17:58:16 +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
ad2e8ff493 General cleanup of APIC code.
stop_cpus/restart_cpus STILL not working!
1997-07-08 23:32: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
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
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
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
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
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
Steve Passe
0eb9918b17 Removed '#include <machine/smptests.h>' line, no longer needed. 1997-06-27 18:29:55 +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
Tor Egge
b672570754 Back out a bad commit. 1997-06-26 02:04:34 +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
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
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
KATO Takenori
7367854ebc Recognize AMD K5 PR166 and PR200 CPUs. 1997-06-24 09:45:35 +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
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
Bruce Evans
c8f8a520f6 Fixed va_arg() to work for small args (as in stdarg.h). 1997-06-21 16:20:55 +00:00
Garrett Wollman
b551bf4430 Fix another power down braino. 1997-06-15 02:24:06 +00:00
Garrett Wollman
3f7773458e When APM is configured, turn off the power when halting for good. 1997-06-15 02:03:03 +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
Bruce Evans
7b3c84247b Preserve %fs and %gs across context switches. This has a relatively low
cost since it is only done in cpu_switch(), not for every exception.
The extra state is kept in the pcb, and handled much like the npx state,
with similar deficiencies (the state is not preserved across signal
handlers, and error handling loses state).
1997-06-07 04:36:10 +00:00
Bruce Evans
f0a2dcf23d Updated comments. 1997-06-07 00:49:45 +00:00
Jordan K. Hubbard
818de095b4 YAMF22 - XSERVER comment changes. 1997-06-06 12:24:43 +00:00
Paul Traina
562d05dfae Document a non-standard gdbremote protocol extension (kludge, really)
that I snuck in to our GDB last year.  This allows you to debug headless
machines by sharing the console port between the debugger and the system
console.  It's not 100% reliabile, but it works well.  It's optional
and disabled by default.
Submitted by:	Juniper Networks
1997-06-04 16:44:29 +00:00
Peter Wemm
2895de58f2 Fill in some gaps in the cpuid features list..
bit 10 is the old bit for MTRR (presumably this changed, an older P5 I
have has got it, the newer cpus have the new MTRR bit set)
bit 11 is SEP (fast syscalls),  bit 23 is MMX
Fill in the other reserved ones with a stub so that we can see them if
they turn up.

Obtained from: Intel AP-485 rev.06
1997-06-02 18:55:44 +00:00
KATO Takenori
40b2de1758 Added PC-98 code. 1997-06-02 15:28:10 +00:00
Doug Rabson
6d47a3a499 Change isa_device.h to intr_machdep.h 1997-06-02 10:44:08 +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
Peter Wemm
5400ed3b2f Include file updates.. <machine/spl.h> -> <machine/ipl.h>, add
<machine/ipl.h> to those files that were depending on getting SWI_*
implicitly via <machine/cpufunc.h>
1997-05-31 09:27:31 +00:00
Peter Wemm
5354c7c8d2 remove #include of <machine/spl.h> - they are externed now
Reviewed by: bde
1997-05-31 09:13:03 +00:00
Peter Wemm
0589fe3b6e The SWI_NET_MASK and SWI_TTY_MASK handlers are now back adjacent to the
top of the hardware interrupt handlers.  Apparently this is slightly
faster with the bit scanning instruction that looks these up - this set of
changes reverts the original change.

Reviewed by: bde
1997-05-31 08:59:51 +00:00
KATO Takenori
20916c1f24 - Use 6x86MX' instead of M2'. Cyrix officially use `6x86MX' for the
CPU code-named `M2'.

- Use the result of cpuid instruction instead of DIR to identify
  6x86MX cpu.  DIR0 and DIR1 are not documented in the data sheet, and
  cpuid instruction is enabled at reset time.

- Add a function, init_6x86MX() to initialize 6x86MX cpu.  It supports
  CPU_SUSP_HLT and CPU_IORT options.  It always sets NC1 (640K - 1M is
  not cached.), and enables L1 cache in write-back mode.

- Fix typo in the comment in identblue().
1997-05-31 08:45:24 +00:00
Steve Passe
a8baaafda0 Code such as apic_base[APIC_ID] converted to lapic__id
Changes to pmap.c for lapic_t lapic && ioapic_t ioapic pointers,
currently equal to apic_base && io_apic_base, will stand alone with the
private page mapping.
1997-05-29 05:58:41 +00:00
Steve Passe
08942d4605 apic.h now has structure definitions for both the local APIC and io APIC.
apic.h has defines like:
#define lapic__id       lapic->id

Once private pages and "known virtual addr" mapping of the APICs is
ready all 'lapic__XXX' will be changed to 'lapic.XXX', and the defines
will be removed.

Changes to smp.h for lapic_t lapic && ioapic_t ioapic pointers,
currently equal to apic_base && io_apic_base, will stand alone with the
private page mapping.
1997-05-29 05:57:43 +00:00
Steve Passe
4fd20a6b2a Added code to manage the local and io APICs as structures. 1997-05-29 05:56:12 +00:00
Peter Wemm
288e2230b5 remove no longer needed opt_smp.h includes 1997-05-29 05:11:11 +00:00
Peter Wemm
64b3672f39 minor style police (recent divergence from KNF code) 1997-05-29 05:07:10 +00:00
Peter Wemm
ae9249615f remove opt_smp.h and fix the reason it was needed. 1997-05-29 05:04:30 +00:00
Peter Wemm
7a14de6260 No longer need opt_smp.h here 1997-05-29 05:00:35 +00:00
Peter Wemm
ecf8148761 remove opt_smp.h from this well-included file, minor style police 1997-05-29 04:58:04 +00:00