Commit Graph

1437 Commits

Author SHA1 Message Date
phk
1046d2834c Look for another couple of magic bios things.. 1997-09-24 07:47:43 +00:00
bde
34ccba588c Moved setconf() call after root configuration again. This fixes a
null pointer panic in the "generic" version of setconf().

Removed the resulting near-duplicate printf.
1997-09-23 17:14:37 +00:00
peter
b40d690188 Turn on CR4_VME on the AP's the same as the BSP. Note that we do not
[yet] probe the AP's for their cpuid/capabilities etc, so this is a fudge
at best.

Problem noted by: Jonathan Lemon <jlemon@americantv.com>
1997-09-22 05:03:03 +00:00
gibbs
1b38c4500b Oops. This file shouldn't have been committed. 1997-09-22 00:37:08 +00:00
gibbs
36f31a4448 aha1542.c aic6360.c cy.c fd.c ft.c
if_ie.c if_wl.c if_zp.c isa.c isa_device.h
labpc.c mcd.c ncr5380.c scd.c seagate.c si.c
sio.c tw.c ultra14f.c wcd.c wd.c:

	Update for changes in the callout interface.

apic_vector.s icu_vector.s ipl.s ipl_funcs.c:

	Add CAM software/hardware interrupt support.
1997-09-21 21:41:49 +00:00
gibbs
21174c6321 autoconf.c:
Add cpu_rootconf and cpu_dumpconf so that configuring these
	two devices can be better controlled by the MI configuration
	code.

machdep.c:
	MD initialization code for the new callout interface.

trap.c:
	Add support for printing out whether cam interrupts are masked
	during a panic.
1997-09-21 21:38:05 +00:00
gibbs
c88c859fdd Move the rules for aicasm to the MI conf file. 1997-09-21 21:34:31 +00:00
peter
da506e2d53 Implement the parts needed for VM86 under SMP. 1997-09-21 15:03:59 +00:00
dyson
87c67f00d0 Add support for more than 1 page of idle process stack on SMP systems. 1997-09-21 05:50:02 +00:00
phk
933d4a785b For AMD chips, pick up the long description from the chip if
possible. (This is not really a typographical improvement in the
case of the K6 it seems, but AMD appearantly want it too look
that way).  Also if bootverbose, dump some more info about the
chip.
1997-09-20 13:18:48 +00:00
jmg
c5005ffdf1 teach pnp to keep isa_device structs around, and teach isa.c how to scan
these structs for conflics...

it still exist that two PnP cards can colide, but this is up to the user
to make sure it doesn't happen...

other modifications to pnp.c to format output properly, and hide more
output behind bootverbose flag...

fix some bugons in pnp.h that would of made it difficult for inclusion
in external programs (for import of pnpinfo)
1997-09-19 15:20:25 +00:00
joerg
e0d9215e40 Addf flags 0x10 to the sio0 line, so it is available as a potential
console.  This features backwards-compatibility to the era when sio(4)
was always available for a console.
1997-09-14 18:57:01 +00:00
peter
58767db594 Update select -> poll in drivers. 1997-09-14 03:19:42 +00:00
joerg
954dd8c56b Revert the logic behind my last change, and use a function called
`is_physical_memory()' now for the decision whether to dump some
region of memory or not.

Suggested by:	davidg
1997-09-13 16:12:15 +00:00
joerg
efe691d045 Do not ever try to coredump adapter memory regions.
PR:		4486
Submitted by:	tegge@idi.ntnu.no (Tor Egge)

Implement a function is_adapter_memory() in order to determine what
should nto be dumped at all.  Currently, only populated with the ``ISA
memory hole''.  Adapter regions of other busses should be added.
1997-09-10 12:31:40 +00:00
jmg
fc0c4f6c13 add neccessary calls to autoconf for pnp,
also teach userconfig about the new pnp commands, for usage see pnp(4)
1997-09-09 12:48:59 +00:00
peter
3279cd035e Change an assemble-time divide into a shift. Under binutils-2.8 gas in elf
mode, the slash is a comment leader, while under non-elf it is a divide
symbol (what a concept! :-).  Theoretically, #APP/#NO_APP can change this
but that doesn't seem to mesh too well with macros and line continuation.
1997-09-08 06:40:58 +00:00
fsmp
fa174d6806 General cleanup of the lock pushdown code. They are grouped and enabled
from machine/smptests.h:

#define PUSHDOWN_LEVEL_1
#define PUSHDOWN_LEVEL_2
#define PUSHDOWN_LEVEL_3
#define PUSHDOWN_LEVEL_4_NOT
1997-09-07 22:04:09 +00:00
dyson
f7cce0762a Fix an intermittent problem during SMP code operation. Not all of the
idle page table directories for all of the processors was being updated
during kernel grow operations.  The problem appears to be gone now.
1997-09-07 01:15:13 +00:00
peter
52d315712d Argh, what was I thinking?? Don't (yet) halt the CPU in the idle loop
while waiting for an interrupt (rather than spinning on the runqueue status
bits), since the other cpu can put stuff in there and the sleeping cpu may
not get an interrupt for a while.  When we have a reschedule IPI, this can
come back.

Pointed out by: fsmp
1997-09-05 17:54:07 +00:00
peter
bc64e1cb55 Cosmetic adjustment for the trap/double fault/panic cpu id listing.
It now prints the apic id in hex rather than decimal.
1997-09-05 08:54:55 +00:00
dg
58817d84ed Cosmetic change to last commit: speculative_mtest -> speculative_mprobe. 1997-09-04 15:23:33 +00:00
dg
8e161ca3e4 Changed the memory sizing code so that if the following conditions
are met:

1) The BIOS indicates that there is exactly 64MB of RAM, and
2) The memory size isn't specified with the MAXMEM option or
   the npx0 msize hack,

   ...then do a speculative memory probe beyond the 64MB's until the
first bad page is encountered. This is an admitted hack, but should
nonetheless deal with detecting the correct amount of memory in nearly
all of the modern systems with >64MB of RAM.
Also made a change that will cause the list of detected memory chunks
to be printed if bootverbose is set.
1997-09-04 15:14:48 +00:00
bde
ec06a8cbcf Removed unused #includes. 1997-09-02 20:06:59 +00:00
fsmp
4e4d661f5b Removed the "globl" nature of the vec array. This was left over from the
time when icu.s was common between UP and SMP.  It is not necessary for UP
and thus can be removed from icu_ipl.s.
1997-09-02 19:40:13 +00:00
fsmp
039acd1ea3 General cleanup of the sub-system locking macros.
Eliminated the RECURSIVE_MPINTRLOCK.
clock.c and microtime use clock_lock.
sio.c and cy.c use com_lock.

Suggestions by:	Bruce Evans <bde@zeta.org.au>
1997-09-01 07:45:37 +00:00
fsmp
70d7802c47 Cleanup. 1997-09-01 07:31:54 +00:00
bde
5bc03b1a8b Move closer to supporting VM86 under SMP.
LINT now compiles but doesn't link.  Other link-time breakage for LINT
is now visible (SMP is incompatible with SIMPLELOCK_DEBUG).
Submitted by:	jlemon
1997-09-01 01:54:52 +00:00
bde
aa399eeba2 Removed unused #includes. 1997-09-01 01:12:53 +00:00
bde
acd45c4cea Fixed options SHOW_BUSYBUFS and PANIC_REBOOT_WAIT_TIME which were broken
by incomplete cutting and pasting from machdep.c to kern_shutdown.c.

PR:		3953
1997-08-31 23:08:38 +00:00
fsmp
9d8f3349c3 Debug version of simple_lock. This will store the CPU id of the
holding CPU along with the lock.  When a CPU fails to get the lock
it compares its own id to the holder id.  If they are the same it
panic()s, as simple locks are binary, and this would cause a deadlock.

Controlled by smptests.h: SL_DEBUG, ON by default.

Some minor cleanup.
1997-08-31 03:17:48 +00:00
peter
722775df92 Define some machine characteristics using symbol naming on conventions
in place in the other BSD's.
1997-08-30 18:59:48 +00:00
fsmp
57215b86a9 Another round of lock pushdown.
Add a simplelock to deal with disable_intr()/enable_intr() as used in UP kernel.
UP kernel expects that this is enough to guarantee exclusive access to
regions of code bracketed by these 2 functions.
Add a simplelock to bracket clock accesses in clock.c: clock_lock.

Help from:	Bruce Evans <bde@zeta.org.au>
1997-08-30 08:08:10 +00:00
kato
673592ad96 Move MACHINE_ARCH definition from <machine/param.h> to <machine/cpu.h>.
Submitted by:	Bruce Evans <bde@zeta.org.au>
1997-08-30 02:52:04 +00:00
fsmp
d655af1289 Support for the new FAST_HI algorithm, enabled.
Preliminary support for the INTR_SIMPLELOCK algorithm, disabled.
Note that this code is NOT ready.
1997-08-29 18:45:23 +00:00
fsmp
c91b1896e3 Support for the new FAST_HI algorithm.
Improved interrupt handling, fewer silo overflows.

With help from:	dave adkins <adkin003@gold.tc.umn.edu>
1997-08-29 18:16:18 +00:00
jlemon
d7a8a42c17 Remove the vm86 support as an LKM, and link it directly into the kernel
if 'options "VM86"' is in the config file.  The LKM was really for
development, and has probably outlived its usefulness.
1997-08-28 14:36:56 +00:00
msmith
42a01255f3 Here is a patch to alleviate the current problem with the dma interface
and the sound driver which uses auto dma.

The  dma interface functionality remains however it now checks
to see if a dma is operating in auto dma mode and if so it bypasses
the busy flag check . I have modified the sound driver 3.5  to
adjust for this new behavior and tested it under FreeBSD 3.0 -current

This patch also includes the new function isa_dmastop.

Submitted by:	Amancio Hasty <hasty@rah.star-gate.com>
1997-08-28 03:36:40 +00:00
peter
a2ae9c0e2b Correct some things I forgot about until it was too late with smp_active.
smp_active = 1 used to indicate that the system had frozen previously
started AP's, while smp_active = 0 was "AP's not yet started".  I have split
this into smp_started (which is set when the AP's come online), and
smp_active is left for turning on/off AP scheduling.
1997-08-26 18:36:15 +00:00
peter
b952b9044c Clean up the SMP AP bootstrap and eliminate the wretched idle procs.
- We now have enough per-cpu idle context, the real idle loop has been
revived (cpu's halt now with nothing to do).
- Some preliminary support for running some operations outside the
global lock (eg: zeroing "free but not yet zeroed pages") is present
but appears to cause problems.  Off by default.
- the smp_active sysctl now behaves differently. It's merely a 'true/false'
option.  Setting smp_active to zero causes the AP's to halt in the idle
loop and stop scheduling processes.
- bootstrap is a lot safer.  Instead of sharing a statically compiled in
stack a number of times (which has caused lots of problems) and then
abandoning it, we use the idle context to boot the AP's directly.  This
should help >2 cpu support since the bootlock stuff was in doubt.
- print physical apic id in traps.. helps identify private pages getting
out of sync.  (You don't want to know how much hair I tore out with this!)

More cleanup to follow, this is more of a checkpoint than a
'finished' thing.
1997-08-26 18:10:38 +00:00
bde
034ed7f456 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
bde
beee5c07ae 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
bde
62eb017235 Removed a bogus comment. 1997-08-25 21:28:08 +00:00
peter
ccb023b5bd 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
fsmp
1abfa1e37c 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
fsmp
9240a89ca5 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
bde
d9011cba0b #include <machine/limits.h> explicitly in the few places that it is required. 1997-08-21 20:33:42 +00:00
charnier
603c39a2b4 Revert my previous commit about using CS_SECURE macro.
Requested by:	Bruce.
1997-08-21 06:33:04 +00:00
fsmp
a07685b4f9 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
fsmp
934e819cd1 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
fsmp
1d4d939eed 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
charnier
9e25737879 Use CS_SECURE macro.
Reviewed by:	John Dyson
1997-08-18 06:58:59 +00:00
fsmp
fc25abdcbe Removed volatile from arg to simple_lock & friends. 1997-08-18 03:35:59 +00:00
fsmp
c5ce352a0b 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
9e8e8e303d 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
dyson
86439cf7a4 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
fsmp
21734f85cf Oops, fix breakage to UP kernel. 1997-08-10 21:18:01 +00:00
fsmp
7ce849c749 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
fsmp
c651f42932 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
fsmp
3d14ba3d9b 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
fsmp
c7713b626e Minor conditionalization of XXX_MPLOCK on PEND_INTS. 1997-08-09 22:52:59 +00:00
fsmp
007eff88f2 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
dyson
3940501545 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
dyson
0b877c86bc 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
dyson
37af3d6f42 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
dyson
556b51cba3 Fix the DDB breakpoint code when using the 4MB page support. 1997-08-07 05:15:52 +00:00
dyson
94e69ecd91 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
4ec0b0fd9f printf does not understand %hd in the kernel 1997-08-06 11:08:01 +00:00
dyson
ae8763a12f Another attempt at cleaning up the new memory allocator. 1997-08-05 22:24:31 +00:00
dyson
6ff0ca7009 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
msmith
2eca02d206 memcmp -> bmcp
Submitted by:	smp, bde
1997-08-05 01:38:19 +00:00
dyson
89a3a9c13f Modify pmap to use our new memory allocator. 1997-08-05 01:32:05 +00:00
dyson
b14804248f Slightly reorder some operations so that the main processor gets global
mappings early on.
1997-08-05 01:02:14 +00:00
dyson
03bfbc0381 Remove the PMAP_PVLIST conditionals in pmap.*, and another unneeded define. 1997-08-05 00:42:01 +00:00
dyson
35ff26fbc9 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
fsmp
6f4b57a4fc 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
msmith
1b869912a8 Nuke the nonexistend pad bytes from the end of the DMI header structure. 1997-08-04 03:31:23 +00:00
msmith
3092e6ec3a 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
msmith
79b617afec 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
msmith
9cb684f597 Support for PC BIOS functions. 1997-08-01 06:04:59 +00:00
fsmp
d5ecc596d9 Fixed imen declaration.
Submitted by:	Bruce Evans <bde@zeta.org.au>
1997-07-31 17:28:20 +00:00
fsmp
d755cf7450 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
fsmp
ed12e072bf Converted the TEST_LOPRIO code to default.
removed PEND_INTS 1st try
direct call to MPtrylock
1997-07-31 05:42:06 +00:00
fsmp
1d8633078b Converted the TEST_LOPRIO code to default. 1997-07-31 05:39:49 +00:00
msmith
7e8f2b71bb 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
msmith
f5da651dc1 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
msmith
613bbeb5be 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
fsmp
51b151f60c 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
fsmp
7e363a6813 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
fsmp
d997ba51b3 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
fsmp
2f3d4812b5 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
deca8eb6a1 Treat 6x86MX CPU as 686-class CPU instead of 586-class CPU. 1997-07-24 14:19:25 +00:00
msmith
2f43d5e1d1 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
fsmp
0f88ae7ddd 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
fsmp
d0dd09af19 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
fsmp
513651553b 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
fsmp
4dd2ddfba0 Coded simple_lock and friends in asm. 1997-07-23 05:49:19 +00:00
fsmp
0eca3af576 Last commit didn't take, operator error??? 1997-07-22 20:12:32 +00:00
fsmp
22d468ce6a Hid the existance of imen via a dump routine. 1997-07-22 19:57:30 +00:00
jkh
167188a3b7 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
fsmp
2adeab6400 Enabled the FPU emilaute bit define: CR0_EM
Reviewed by:	Bruce Evans <bde@zeta.org.au>
1997-07-21 17:53:51 +00:00
fsmp
bbc0c98461 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
fsmp
d111aa6dec 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
dyson
c6a97144a0 Fix a crash that has manifest itself while running X after the 4MB
page upgrades.
1997-07-21 01:21:25 +00:00
fsmp
22eb1fdc93 Developed a new strategy for handling the 8254/8259/APIC issue. 1997-07-20 19:41:38 +00:00
fsmp
23351d73c7 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
fsmp
9110fe62af Minor cleanup. 1997-07-20 18:02:59 +00:00
fsmp
dc3b7dcdf4 Pass string arg to apic_dump. 1997-07-20 18:02:19 +00:00
bde
60639b8ee4 Removed unused #includes. 1997-07-20 14:10:18 +00:00
bde
d60b4c3f6c Removed unused #includes and a stale forward declaration. 1997-07-20 11:06:44 +00:00
bde
2ba31be0ca Removed unused #includes. 1997-07-20 08:37:24 +00:00
fsmp
48ae96e7cd 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
fsmp
4a2ebf4ef2 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
fsmp
0a94beac51 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
fsmp
0ef506aab6 Increased NIDT to 256 for case of SMP or APIC_IO. 1997-07-19 02:24:37 +00:00
fsmp
d1566994ed Split TEST_CPUSTOP code into CPUSTOP_ON_DDBBREAK and mainline code. 1997-07-18 21:27:53 +00:00
fsmp
f866dd3e42 Made the printing of the APIC INTs depend on bootverbose. 1997-07-18 03:59:28 +00:00
fsmp
9fb05b9874 printf cleanup. 1997-07-18 03:58:14 +00:00
dyson
c03b894cd5 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
dyson
f35b8ef09f 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
b2d05aaaf6 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
18d3ca1a34 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
fsmp
f57d3a1622 Removed a stale "FIXME:". 1997-07-15 04:56:18 +00:00
jkh
1f5229e2b7 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
fsmp
77494c7bf1 Cleanup. 1997-07-15 03:28:53 +00:00
fsmp
25b936e541 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
fsmp
e50991f7fa Tighten up asm code for EOI access. 1997-07-15 02:49:21 +00:00
fsmp
cd7bffbabe New defines to eliminate "magic numbers" in various places. 1997-07-15 02:47:54 +00:00
fsmp
2e5fa9e507 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
fsmp
89f1878c25 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
fsmp
c59ff61657 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
ache
d742242573 Back out my changes with 'conflicts' keyword for IRQs,
sounddriver fixed now.
1997-07-09 17:58:16 +00:00
fsmp
9c29e029e7 General cleanup of APIC code.
stop_cpus()/restart_cpus() STILL not working!
1997-07-08 23:46:00 +00:00
fsmp
29bb535fa3 Minor cleanup of APIC code. 1997-07-08 23:42:02 +00:00
fsmp
03760a522e General cleanup of APIC code.
stop_cpus/restart_cpus STILL not working!
1997-07-08 23:32:58 +00:00
fsmp
dae4cd91b9 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
fsmp
d157b3e439 Additional debugging functions and macros.
"spurious INTerrupt" support.
1997-07-06 23:40:15 +00:00
fsmp
d56c6e8a3b 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
fsmp
d7ff7f1a63 #ifdef out debug for now... 1997-07-06 23:25:46 +00:00
fsmp
1c189a5dc1 Added a hook for a "spurious INTerrupt handler". 1997-07-06 22:11:26 +00:00
bde
e1143da697 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
bde
7bcdb36b5d 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
fsmp
0f845ff80c 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
fsmp
e069df3332 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
fsmp
2dc6dfa6f4 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
fsmp
2056f7d053 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
fsmp
fe7aee3201 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
fsmp
02858856d1 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
fsmp
6e6c9ef5e7 Added fields to the LVT1/2 group. 1997-06-27 22:13:50 +00:00
fsmp
3d281e17ac Removed '#include <machine/smptests.h>' line, no longer needed. 1997-06-27 18:29:55 +00:00