Commit Graph

1128 Commits

Author SHA1 Message Date
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
Peter Wemm
db7df99ff1 Try and make these usermode safe, Steve beat me in finding these.. 1997-04-26 20:04:21 +00:00
Peter Wemm
73f4384dc1 Remove the curproc printing on trap/interrupt/etc. It's outlived it's
usefulness, and there were problems with it anyway.

Found by: bde
1997-04-26 19:12:03 +00:00
Peter Wemm
c9c20622ad Back out bogus code that slipped past my read of the pre-merge diff
(Problems noted by Bruce)
1997-04-26 18:59:42 +00:00
Peter Wemm
acc7657309 Fix some SMP merge bugs (from Bruce) -
#include out of order
pccard_configure() called twice
munged tab (existing problem made worse)
1997-04-26 18:57:34 +00:00
Peter Wemm
477a642cee Man the liferafts! Here comes the long awaited SMP -> -current merge!
There are various options documented in i386/conf/LINT, there is more to
come over the next few days.

The kernel should run pretty much "as before" without the options to
activate SMP mode.

There are a handful of known "loose ends" that need to be fixed, but
have been put off since the SMP kernel is in a moderately good condition
at the moment.

This commit is the result of the tinkering and testing over the last 14
months by many people.  A special thanks to Steve Passe for implementing
the APIC code!
1997-04-26 11:46:25 +00:00
KATO Takenori
9ca8226735 Add new cpu type, CPU_CY486DX, which shows Cyrix 486S/DX series CPUs,
and initialization routine for those CPUs.

Tested by:	Bob Bishop <rb@gid.co.uk>
1997-04-26 04:08:54 +00:00
Bruce Evans
a862685541 Fixed longstanding profiling bug. The frame pointer wasn't set up
for syscalls, so one frame was lost in backtraces from syscalls.
This is handled better in the kernel by using a different mcount
entry point for profiling before the frame pointer is set up.

Expand RCSID().

Use .p2align instead of the ambiguous .align.

Added idempotency ifdef.

Removed unused macros ALTENTRY(), ALTASENTRY(), ASENTRY(), _MID_ENTRY.

Cleaned up formatting.

Reviewed by:	jdp reviewed an old version
Obtained from:	parts from NetBSD
1997-04-23 19:26:04 +00:00
John Polstra
9081eec1fb Make the necessary changes so that an ELF kernel can be built. I
have successfully built, booted, and run a number of different ELF
kernel configurations, including GENERIC.  LINT also builds and
links cleanly, though I have not tried to boot it.

The impact on developers is virtually nil, except for two things.
All linker sets that might possibly be present in the kernel must be
listed in "sys/i386/i386/setdefs.h".  And all C symbols that are
also referenced from assembly language code must be listed in
"sys/i386/include/asnames.h".  It so happens that failure to do
these things will have no impact on the a.out kernel.  But it will
break the build of the ELF kernel.

The ELF bootloader works, but it is not ready to commit quite yet.
1997-04-22 06:55:47 +00:00