Commit Graph

1136 Commits

Author SHA1 Message Date
Steve Passe
1ffa54ef38 Added a test called 'LATE_START'.
This is now the default, it delays most of the MP startup to the function
machdep.c:cpu_startup().  It should be possible to move the 2 functions
found there (mp_start() & mp_announce()) even further down the path once
we know exactly where that should be...

Help from: Peter Wemm <peter@spinner.dialix.com.au>
1997-05-26 09:23:30 +00:00
Steve Passe
383243e687 Made the array vec[] a global.
This allows the APIC code to reorder the vectors at runtime.
1997-05-25 16:55:26 +00:00
Steve Passe
45fedb144d Broke up parse_mp_table() into 2 passes:
- The 1st (preparse_mp_table()) counts the number of cpus, busses, etc. and
   records the LOCAL and IO APIC addresses.
 - The 2nd pass (parse_mp_table()) does the actual parsing of info and recording
   into the incore MP table.

This will allow us to defer the 2nd pass untill malloc() & private pages
are available (but thats for another day!).
1997-05-25 02:49:03 +00:00
Steve Passe
2515353993 Delay mp_start() till after the msgbuf is mapped. We really want to delay
it till even later but tss setup prevents that right now...
1997-05-24 18:59:02 +00:00
Steve Passe
7f6c65fa06 Now that panic() is properly printing messages for early SMP panics all
the 'printf("..."); panic("\n")' sections are returned to 'panic("...")'.
1997-05-24 18:48:53 +00:00
Philippe Charnier
f29fffef82 typo (Cyirx -> Cyrix). 1997-05-23 06:22:47 +00:00
Steve Passe
89921bb594 Convert all:
panic( "xxxxx\n" );

to:
 printf( "xxxxx\n" );
 panic( "\n" );

For some as yet undetermined reason the argument to panic() is often NOT
printed, and the system sometimes hangs before reaching the panic printout.
So we hopefully at least print some useful info before the hang, as oppossed to
leaving the user clueless as to what has happened.
1997-05-22 22:35:42 +00:00
John Polstra
61b005296f This commit affects ELF kernels only.
Remove "setdefs.h" and arrange to generate it automatically at
ELF kernel build time.

"gensetdefs.c" is a utility which scans a set of ELF object files
and outputs a line ``DEFINE_SET(name, length);'' for each linker
set that it finds.  When generating an ELF kernel, this is run just
before the final link to generate "setdefs.h".

Remove the init_sets() function from "setdef0.c", and its call from
"machdep.c".  Since "gensetdefs.c" calculates the length of each
set, it is no longer necessary in an ELF kernel to count the set
elements at kernel initialization time.  Also remove "set_of_sets"
which was used for this purpose.

Link "setdef0" and "setdef1" into the kernel only if building for
ELF.  Since init_sets() is no longer used, there is no need to link
them into an a.out kernel.
1997-05-21 23:21:30 +00:00
John Polstra
5851a3655a Fill out the ELF header files to make them more or less complete.
Fix a macro name that was misspelled both in brandelf.c and
imgact_elf.h.
1997-05-21 23:07:31 +00:00
John Polstra
713da3ed8b Make setbits() SMP-safe. Eliminate the SETBITS() macro, and replace
all uses of it with the equivalent calls to setbits().

This change incidentally eliminates a problem building ELF kernels
that was caused by SETBITS.

Reviewed by:	fsmp, peter
Submitted by:	bde
1997-05-21 22:56:05 +00:00
KATO Takenori
0f5ccb66e4 Recognize AMD 486 CPUs. 1997-05-19 12:41:35 +00:00
Tor Egge
7783c29bb1 Ignore the supplied nfs_diskless structure from the bootstrap loader
if we want to use NFS v3 to mount root and swap.
1997-05-15 19:12:56 +00:00
Tor Egge
432aad0e98 Bring in some kernel bootp support. This removes the need for netboot
to fill in the nfs_diskless structure, at the cost of some kernel
bloat. The advantage is that this code works on a wider range of
network adapters than netboot. Several new kernel options are
documented in LINT.
Obtained from: parts of the code comes from NetBSD.
1997-05-11 18:05:39 +00:00
Bruce Evans
b8dbeb6b4d Fixed initialization of ldt[]. Unused entries were garbage. A comment
was stale.

Fixed initialization of gdt[] for the BDE_DEBUGGER case.  APM entries
clobbered debugger entries if the debugger was loaded (APM is incompatible
with BDE_DEBUGGER) and unused entries were garbage if the debugger wasn't
loaded.
1997-05-11 12:39:43 +00:00
Bruce Evans
1cbeae88a4 Cleaned up #includes. Lite2 cleaned up <sys/mount.h> so no kludges
are required for NFS now.

Ifdefed SMP #defines.
1997-05-10 08:01:13 +00:00
Steve Passe
c2855f6e47 fix bug in get_isa_apic_mask() where EISA bus was ignored.
Submitted by:	 Peter Wemm <peter@spinner.DIALix.COM>
1997-05-07 22:25:27 +00:00
Peter Wemm
d021fc112b Don't allow access to illegal addresses in /dev/kmem to panic kernel
(eg: above 0xffc00000).  Programs using /dev/kmem are implicitly racing
the kernel, and can get right up high in memory.  I've been running
these for some time now, but with printfs.  It's saved two panics at
least that I can remember.
1997-05-07 20:32:41 +00:00
Peter Wemm
1f8745a9c3 clean up forked child creation. This is simplified also by having
md_regs being struct trapframe *.  Do a npxsave() if needed and copy the
pcb rather than use the increasingly defunct savectx().  Copy %edi and
%ebp explicitly.

Submitted by: bde

XXX npxproc could be declared in npx.h so the externs with smp fruit
are not needed.
1997-05-07 20:19:18 +00:00
Peter Wemm
914970e6e9 md_regs is struct trapframe * now, rather than int []
Remove TF_REGP() macro and use.  The original reason (address space
problems due to having UPAGES in mapped into user space) is gone.  It
looks cleaner without it.
1997-05-07 20:12:47 +00:00
Peter Wemm
835834c085 md_regs is now a struct trapframe * 1997-05-07 20:08:53 +00:00
Peter Wemm
8359d00f20 forgotten comment 1997-05-07 20:07:25 +00:00
Peter Wemm
36428e6100 simplify IOPL gain/remove privs code. It's easier with md_regs
being a trapframe.
1997-05-07 20:02:38 +00:00
Peter Wemm
06884fd04e remove now redundant (struct trapframe *) cast 1997-05-07 19:58:13 +00:00
Peter Wemm
6f486a5552 Convert md_regs from an int[] to a struct trapframe *. It simplifies
some code.
1997-05-07 19:55:13 +00:00
Peter Wemm
2263dd148e remove #include "opt_smp.h"
remove declarations for the SMPcurproc[NCPU] etc arrays. There was no
need to mention NCPU there, and they've been moved to their normal home.
1997-05-07 19:53:20 +00:00
Peter Wemm
f40e607832 remove #include "opt_smp.h" and <machine/smp.h>. Slightly elaborate on
a comment.
1997-05-07 19:51:59 +00:00
Peter Wemm
503c887bae remove #include opt_smp.h
declare SMPcurpcb[] next to #define and uniprocessor counterpart
1997-05-07 19:49:32 +00:00
Steve Passe
f258030f39 Force user to config SMP kernel with "options APIC_IO".
Reviewed by:	Peter Wemm <peter@spinner.DIALix.COM>
1997-05-06 21:29:57 +00:00
Steve Passe
2479ac60b9 Code to handle SMP/APIC_IO mapping of ISA INTs to APIC pins above IRQ15.
- doesn't break my system.
 - NOT yet verified on the affected motherboard.

Submitted by:	"John S. Dyson" <toor@dyson.iquest.net>
1997-05-05 22:56:37 +00:00
Steve Passe
08896efb1a Code to handle SMP/APIC_IO mapping of ISA INTs to APIC pins above IRQ15.
- doesn't break my system.
 - NOT yet verified on the affected motherboard.

Stifle an annoying dma_start busy message for the sound cards.

Submitted by:	"John S. Dyson" <toor@dyson.iquest.net>
1997-05-05 22:56:13 +00:00
KATO Takenori
7a13a66696 Use MediaGX' instead of Gx86'. 1997-05-05 14:30:00 +00:00
KATO Takenori
a74ff881b7 Use M2' instead of 6x86 with MMX'. Cyrix seems to use `M2' officially. 1997-05-05 14:11:09 +00:00
Peter Wemm
f435322e07 correct the order of the variables
use #ifdef where possible instead of #if defined

Submitted by: the KNF police, ie: bde :-)
1997-05-05 09:34:33 +00:00
John Dyson
b332d9a66e Make sure that *fork() always returns with %edx == 1 in the
child.  This was sometimes not happening correctly during my
threads code work.
1997-05-05 04:08:12 +00:00
Joerg Wunsch
5a9714de76 This mega-commit brings the following:
. It makes cd9660 root f/s working again.
. It makes CD9660 a new-style option.
. It adds support to mount an ISO9660 multi-session CD-ROM as the root
  filesystem (the last session actually, but that's what is expected
  behaviour).

Sigh.  The CDIOREADTOCENTRYS did a copyout() of its own, and thus has
been unusable for me for this work.  Too bad it didn't simply stuff
the max 100 entries into the struct ioc_read_toc_entry, but relied on
a user supplied data buffer instead. :-(  I now had to reinvent the
wheel, and created a CDIOREADTOCENTRY ioctl command that can be used
in a kernel context.

While doing this, i noticed the following bogosities in existing CD-ROM
drivers:

wcd:	This driver is likely to be totally bogus when someone tries
	two succeeding CDIOREADTOCENTRYS (or now CDIOREADTOCENTRY)
	commands with requesting MSF format, since it apparently
	operates on an internal table.

scd:	This driver apparently returns just a single TOC entry only for
	the CDIOREADTOCENTRYS command.

I have only been able to test the CDIOREADTOCENTRY command with the
cd(4) driver.  I hereby request the respective maintainers of the
other CD-ROM drivers to verify my code for their driver.  When it
comes to merging this CD-ROM multisession stuff into RELENG_2_2 i will
only consider drivers where i've got a confirmation that it actually
works.
1997-05-04 15:24:23 +00:00
Peter Wemm
26e5316524 Don't remove i586_ctr_freq from scope, leave it defined as zero. This
simplifies some assumptions and stops some code compile problems.

This should fix the compile hiccup in PR#3491, but smp kernel profiling
isn't likely to be fixed by this.
1997-05-04 14:25:00 +00:00
Steve Passe
004cb62334 added declaration for get_isa_apic_mask().
Submitted by:	"John S. Dyson" <toor@dyson.iquest.net>
1997-05-03 18:05:31 +00:00
Steve Passe
462e62c9a0 new function to turn an APIC pin# into an INT mask.
added missing APIC_IO define.

Submitted by:	"John S. Dyson" <toor@dyson.iquest.net>
1997-05-03 17:42:01 +00:00
Steve Passe
a1b7127157 cleaned up FAST_IPI code.
- one-liners all become inline.
 - multi-liners become functions.
 - FAST_IPI defines go away.

re-worked APICIPI_BANDAID code.
 - now refered to as DETECT_DEADLOCK.
 - on by default.
1997-05-01 19:33:12 +00:00
Steve Passe
f3a946e800 fixed spelling error.
Submitted by:	Bruce Albrecht <bruce@zuhause.mn.org>
1997-05-01 19:27:58 +00:00
Steve Passe
dff5c18abc changed expect_lock() to try_lock(), the real name used in mplock.s 1997-04-30 19:04:26 +00:00
Steve Passe
04964d153d Enabled 'FIX_MP_TABLE_WORKS' code.
This code re-numbers PCI busses in the MP table to match PCI semantics
when the MP BIOS fails to do it properly.

Reviewed by:	Peter Wemm <peter@spinner.DIALix.COM>
1997-04-29 22:12:32 +00:00
Peter Wemm
176c49e057 Use a common numbering of the tty and net software interrupt levels
between the SMP and non-SMP case.  It simplifies the #ifdef's, since
NHWI changes (at least for the moment) when APIC's are involved.
1997-04-29 20:05:48 +00:00
Steve Passe
7b2a188c7a cleaned out an old FIXME. 1997-04-28 08:39:48 +00:00
Steve Passe
f50a491f78 removed TEST_CPUHITS code.
replaced push/pop of %ds with use of 'ss' prefix in Xinvltlb.

Submitted by:	 Bruce Evans <bde@zeta.org.au>
1997-04-28 01:47:55 +00:00
Steve Passe
34e63b4cd7 removed all the TEST_UPPERPRIO crud. 1997-04-28 01:08:47 +00:00
Steve Passe
2c5d02fff3 remove all the SMP_INVLTLB defines, making the code default for APIC_IO.
Reviewed by:	informal discussion with Peter Wemm <peter@spinner.DIALix.COM>
1997-04-28 00:25:00 +00:00
Steve Passe
296bffc9c0 informal discussion between Bruce Evans <bde@zeta.org.au>,
Peter Wemm <peter@spinner.DIALix.COM>, Steve Passe <smp@csn.net>

removed all the IPI_INTS code.
made the XFAST_IPI32 code default, renaming Xfastipi32 to Xinvltlb.
cleanup of i386/isa/isa_device.h to eliminate SMP dependancies:
  made the id_irq member of struct isa_device an u_int.
  made the id_drq member of struct isa_device an int.
  removed all other '#ifdefs' concerning SMP & APIC_IO.
removed SMP/APIC_IO dependancies from if_ze.c.
1997-04-27 21:18:59 +00:00
Steve Passe
2897614119 informal discussion between Bruce Evans <bde@zeta.org.au>,
Peter Wemm <peter@spinner.DIALix.COM>, Steve Passe <smp@csn.net>

removed all the IPI_INTS code.
made the XFAST_IPI32 code default, renaming Xfastipi32 to Xinvltlb.
1997-04-27 21:17:56 +00:00
Peter Wemm
a8a74574b2 Whoops.. We forgot to turn off the 4MB Virtual==Physical mapping at address
zero from bootstrap in the non-SMP case.

Noticed by: bde
1997-04-27 12:11:43 +00:00