Commit Graph

622 Commits

Author SHA1 Message Date
Jordan K. Hubbard
da8d0268df Pass me the pointed chapeau - this typo somehow got through my testing. 1995-05-11 05:20:43 +00:00
Bill Paul
2c739e6439 If you config a kernel with 'config kernel swap generic' and try to
boot diskless with it, you get a panic because setconf() is only
called for mountroot == ffs_mountroot. It really needs to be called
no matter what manner of rootfs we have. I can't really say if
swapgeneric will work with a CD-ROM though. (I get the feeling I'm
the only one who uses swapgeneric these days anyway.)
1995-05-11 02:50:11 +00:00
Jordan K. Hubbard
9cc347481f Remove all vestiges of the ALLOW_CONFLICT_FOO evil and replace it with
something slightly less evil - a per device conflict flag.
1995-05-11 02:15:55 +00:00
Garrett Wollman
c9cd353a18 Delete two debugging printfs that mistakenly crept in. 1995-05-11 00:16:44 +00:00
Garrett Wollman
748e0b0acc Make networking domains drop-ins, through the magic of GNU ld. (Some day,
there may even be LKMs.)  Also, change the internal name of `unixdomain'
to `localdomain' since AF_LOCAL is now the preferred name of this family.
Declare netisr correctly and in the right place.
1995-05-11 00:13:26 +00:00
David Greenman
85eaa94715 Correct the definition for the (unused) cpu_setstack(). 1995-05-04 07:50:06 +00:00
David Greenman
6486b7f194 Added a memcpy() routine. 1995-05-02 05:20:26 +00:00
Poul-Henning Kamp
807afe4fa5 A missing 'and', probably my fault.
Submitted by:	Ed Hudson <elh@p5.spnet.com>
1995-05-02 04:40:06 +00:00
John Dyson
641a27e68b Fixed a problem that can cause left-over pv_entries and as
as side-effect, removed some legacy code that was necessary
when we called vm_fault inside of vm_fault_quick instead of using
the kernel/user space byte move routines.
1995-05-01 23:32:30 +00:00
Rodney W. Grimes
2320728f46 Add outb to keyboard controller to do a cpu_reset, this fixes 2 known
cases of motherboards that failed to reboot.
1995-04-26 07:38:35 +00:00
Poul-Henning Kamp
58e81aafbb Add support for MFS root filesystem. 1995-04-25 03:41:12 +00:00
Poul-Henning Kamp
d3f4d460f8 Added "bio" to matcd. 1995-04-24 05:33:59 +00:00
Julian Elischer
6944abf1d7 hmm spotted a difference resulting from a merge I didn't examine close enough 1995-04-23 09:17:24 +00:00
Julian Elischer
73bac981dd include hooks for EISA configuration (possibly wrong :) 1995-04-23 09:13:08 +00:00
Poul-Henning Kamp
94624c5572 Forgot this commit the other day. The receiving end of the "boot -C" option. 1995-04-23 04:14:41 +00:00
Bill Paul
31e0d8b925 Tiny printf formatting change: if we have no cpu_vendor or cpu_id info,
don't generate a newline. (Yeah, I'm picking nits, but that empty line
I get on my 386 just looks dumb, okay? :)
1995-04-22 03:58:46 +00:00
Poul-Henning Kamp
804e33a872 Add wd2 and wd3 as swap-devices too. 1995-04-20 06:05:17 +00:00
Rodney W. Grimes
781434c1fc Reapply my fix for this:
Output the CPU features line during the probe on a seperate line, for
folks with lots of features the output use to wrap and look ugle.
1995-04-18 23:55:26 +00:00
Poul-Henning Kamp
8425684b90 Print the BIOS geometries in a human-readable format. 1995-04-17 16:49:50 +00:00
David Greenman
857f4d44be Remove gratuitous waste of 2K of memory for BIOS variables. We never load
the kernel at 0-640k; we haven't had the ability to do that since before
2.0R. Furthermore, I fail to see how putting an instruction at 0 and then
doing a .org 0x500 is going to prevent the stuff from getting clobbered
in the first place; a.out is just too stupid to know about sparse address
spaces.
1995-04-16 10:12:16 +00:00
Bruce Evans
7897b3ce69 Don't waste time sending an EOI to ICU1 if option AUTO_EOI_1 is defined.
Previously, this worked right if both AUTO_EOI_1 and AUTO_EOI_2 are
defined, but not if AUTO_EOI_1 is defined and AUTO_EOI_2 is not defined.
The latter case should be the default.  DUMMY_NOPS should be the default
too.  Currently there are only two NOPs slowing down rtcin() (although
there are no delays in writertc()) and several FASTER_NOPs slowing down
interrupt handling in vector.s.

Fix stack offsets for the (previously) unused untested
FAST_INTR_HANDLER_USES_ES case.
1995-04-15 21:32:18 +00:00
Peter Dufault
8db34c841e Add scsi target. Add "after config" call to autoconf so that scsi
targets will be configured after all scsi busses have been configured.
1995-04-14 15:13:26 +00:00
Bill Paul
09a901eb60 Hopefully I won't get flamed for this: insert a few more #if defined(I486_CPU)
and #if defined (I586_CPU) thingies into identifycpu() so that we only
compile in what's actually needed for a given CPU. So far as I can tell,
none of my 386 machines generate a cpu_vendor code, so I made the extra vendor
and feature line conditional on I486_CPU and I586_CPU. (Otherwise we
print out a blank line which looks silly.)
1995-04-14 02:06:00 +00:00
Bill Paul
695e4afe85 This a subtle reminder to people that not everybody compiles their
kernels with 'options I586_CPU.'

The declaration for pentium_mhz is hidden inside an #ifdef I586_CPU,
but machdep.c refers to it whether I586_CPU is defined or not. This
temporary hack puts the offending code inside an #ifdef I586_CPU as
well so that a kernel without it will successfully compile.

I must emphasize the word 'temporary:' somebody needs to seriously
beat on the identifycpu() function with an #ifdef stick so that
I386_CPU, I486_CPU and I586_CPU will do the right things.
1995-04-13 04:55:35 +00:00
Garrett Wollman
6c0081e92b Add a class field to devconf and mst drivers.
For those where it was easy, drivers were also fixed to call
dev_attach() during probe rather than attach (in keeping with the
new design articulated in a mail message five months ago).  For
a few that were really easy, correct state tracking was added as well.
The `fd' driver was fixed to correctly fill in the description.
The CPU identify code was fixed to attach a `cpu' device.  The code
was also massively reordered to fill in cpu_model with somethingremotely
resembling what identifycpu() prints out.  A few bytes saved by using
%b to format the features list rather than lots of ifs.
1995-04-12 20:48:13 +00:00
Poul-Henning Kamp
8d89e37c73 I got that wrong,
lnc0	@ 0x280
	lnc1	@ 0x300

moved le0 into sorted sequence.
1995-04-10 19:13:51 +00:00
Poul-Henning Kamp
1f9e6f1901 lnc0 is @ 0x300
lnc1 is @ 0x280
1995-04-10 19:12:29 +00:00
Poul-Henning Kamp
17755ac806 Changes to make FreeBSD use a CDROM as rootdev, for installation purposes.
If "BOOTCDROM" is defined, you get this pretty special case stuff.
1995-04-10 07:44:31 +00:00
David Greenman
fcb5be87ad Cosmetic changes. 1995-04-09 05:40:38 +00:00
Poul-Henning Kamp
63373752ea Move default address of lnc0 to 0x300. Luigi Rizzo said that his card
cannot even go below 0x300...
1995-04-08 21:41:52 +00:00
Joerg Wunsch
4fb0b0de3e Implement a simple hook (or hack?) to allow graphics device console
drivers to protect DDB from being invoked while the console is in
process-controlled (i.e., graphics) mode.

Implement the logic to use this hook from within pcvt.  (I'm sure
Søren will do the syscons part RSN).

I've still got one occasion where the system stalled, but my attempts
to trigger the situation artificially resulted int the expected
behaviour.  It's hard to track bugs without the console and DDB
available. :-/
1995-04-08 21:32:11 +00:00
Poul-Henning Kamp
12cfa43650 Added the "eg0" interface driver for the 3Com "3c505" or "etherlink/+"
card.  This is the braindamaged card with the 80186 CPU on it.  It is
slow, probably not very good after all, but hey, if you have one lying
around doing nothing anyway...

Added the "zp0" driver to GENERIC.
1995-04-08 09:36:04 +00:00
Andrey A. Chernov
a30090c5f7 Print "on isa" for devices with port==0 per Bruce suggestion 1995-04-06 13:55:56 +00:00
Rodney W. Grimes
5f34517b1c Output the CPU features line during the probe on a seperate line, for
folks with lots of features the output use to wrap and look ugle.

Reviewed by:	phk
1995-04-06 07:55:42 +00:00
Andrey A. Chernov
29ecb6a386 Print "on motherboard" for isa? devices with id_iobase == 0 1995-04-04 22:48:40 +00:00
David Greenman
7b0047e213 Made pmap_testbit a static function. 1995-03-30 08:55:39 +00:00
Rodney W. Grimes
ad0c439a34 Submitted by: Mahesh Neelakanta <mahesh@gcomm.com>
Change I/O address of Intel EtherExpress driver (ix0) from 0x280 to
0x300.
1995-03-30 00:20:08 +00:00
Bruce Evans
3aa12267a5 Add and move declarations to fix all of the warnings from `gcc -Wimplicit'
(except in netccitt, netiso and netns) that I didn't notice when I fixed
"all" such warnings before.
1995-03-28 07:58:53 +00:00
David Greenman
1ae89ac36a Removed declaration of pmap_changebit()...it is no longer exported.
Submitted by:	John Dyson
1995-03-26 23:42:55 +00:00
David Greenman
880d1d842e Changed pmap_changebit() into a static function as it always should
have been.

Submitted by:	John Dyson
1995-03-26 23:42:07 +00:00
Steven Wallace
c27bd0ad13 Do a printf("\n") after all conditional printfs have been done so that
a newline is always done.  Remove \n's from last conditonal printfs.
1995-03-25 05:54:33 +00:00
Stefan Eßer
0f29bf015c Correct pcibus_setup() to return as soon as one test succeeds. 1995-03-22 21:35:39 +00:00
Stefan Eßer
9c6f3c132b Delete PCI PCI bridge simulator code ...
Submitted by:	Wolfgang Stanglmeier <wolf@kintaro.cologne.de>
1995-03-22 19:51:59 +00:00
Stefan Eßer
33865a313c Remove spurious declaration of printf().
Submitted by:	Michael Reifenberger <root@rz-wb.fh-sw.de>
1995-03-22 10:52:05 +00:00
Stefan Eßer
5b3f532eb1 New ISA specific PCI code.
Supports shared PCI interrupts.

Submitted by:	Wolfgang Stanglmeier <wolf@kintaro.cologne.de>
1995-03-21 23:06:07 +00:00
David Greenman
f550a707bd Added a new version of trap_pfault() that disallows kernel page faults
to the user address space unless pcb_onfault is set. The code is currently
commented out because iBCS2 and process debugging parts of the kernel
need to be changed/fixed first.
1995-03-21 07:16:12 +00:00
David Greenman
c6d5f3ac3e Changed some #ifdef DIAGNOSTIC code that I added to be #ifdef DEBUG. 1995-03-21 07:02:51 +00:00
David Greenman
edf8a81561 Removed redundant newlines that were in some panic strings. 1995-03-19 14:29:26 +00:00
Rodney W. Grimes
f8e028be26 Add Intel EtherExpress16 (ix0) driver.
Reviewed by:
Submitted by:
Obtained from:
1995-03-18 08:12:48 +00:00
David Greenman
3e3eb41588 Call dev_shutdownall() just after unmounting filesystems. 1995-03-17 04:19:19 +00:00
Bruce Evans
b5e8ce9f12 Add and move declarations to fix all of the warnings from `gcc -Wimplicit'
(except in netccitt, netiso and netns) and most of the warnings from
`gcc -Wnested-externs'.  Fix all the bugs found.  There were no serious
ones.
1995-03-16 18:17:34 +00:00
Stefan Eßer
9b2fa02dd9 Prepare for shared interrupts (required by the new PCI code that adds
support for PCI PCI bridges, e.g. found on 4ch. Ethernet cards).

Submitted by:	Wolfgang Stanglmeier <wolf@kintaro.cologne.de>
1995-03-16 17:31:19 +00:00
Atsushi Murai
9cfb8f7ee9 Adding tunnel pseudo-device for Network Installation with User process PPP.
Reviewed by:	amruai@spec.co.jp
1995-03-12 12:10:35 +00:00
Poul-Henning Kamp
fc20488fba Moved bb stuff to support.s per Bruces suggestion. 1995-03-11 03:49:50 +00:00
Poul-Henning Kamp
9eefa8bfc4 Add a dummy ___bb_init_func for BB profiling of the kernel.
To use this: recompile src/gnu/usr.bin/cc, compile your kernel.  The
files you want to profile should be compiled with '-a -g'.  "strip -x"
the kernel and run.  You don't need to profile all files in the kernel.
My next commit is the program to extract the data from the running kernel.
1995-03-10 08:41:26 +00:00
David Greenman
b4abbbcad3 kmem_alloc() returns zero-filled memory; it isn't necessary to bzero()
it.
1995-03-10 08:13:07 +00:00
David Greenman
90c47808bb Removed unnecessary routines vm_get_pmap() and vm_put_pmap().
kmem_alloc() returns zero filled memory, so no need to explicitly
bzero() it.
1995-03-10 08:05:00 +00:00
David Greenman
d8cb3fb153 Increased number of buffers to 1/12 of (page_count - 1024). This makes the
cache minimum closer to 10% in the usual case.
1995-03-07 19:58:02 +00:00
Joerg Wunsch
68cfe626f7 pcvt is still using the XSERVER option; document this. 1995-03-05 22:23:35 +00:00
Bill Paul
bf3e3428b6 Changed the printf()s in npxattach a bit so you don't end up with
messages like this:

wdc0 at 0x1f0-0x1f7 irq 14 on isa
wdc0: unit 0 (wd0): <ST506>
wd0: size unknown, using BIOS values: 615 cyl, 4 head, 17 sec, bytes/sec 512
npx0 at 0xf0-0xff irq 13 on motherboard
npx0: changing root device to wd0a
^^^^^^

The spurious 'npx0: ' pops up if you have a 386 with a 387 FPU.
1995-03-05 04:06:44 +00:00
David Greenman
812a11a2ec Removed obsolete vtrace() and reorganized a little. 1995-03-04 02:25:36 +00:00
David Greenman
3b7517f887 Preserve reverse link integraty while doing the queue insertion. 1995-03-03 22:14:42 +00:00
David Greenman
9ad19d92e1 Use copyout to install the sigframe rather than directly writing to the
user's stack.
1995-03-03 00:43:08 +00:00
Jordan K. Hubbard
05e1d9d455 Changes to incorporate the Matsushita CDROM driver (otherwise known as
the "Sound blaster CDROM").
Submitted by:	Frank Durda IV <bsdmail@nemesis.lonestar.org>
1995-03-02 04:07:03 +00:00
David Greenman
1d1b971bec Use su/fubyte instead of directly touching the user's address space. 1995-03-01 23:59:21 +00:00
David Greenman
fde2cdc48a Various changes from John and myself that do the following:
New functions create - vm_object_pip_wakeup and pagedaemon_wakeup that
are used to reduce the actual number of wakeups.
New function vm_page_protect which is used in conjuction with some new
page flags to reduce the number of calls to pmap_page_protect.
Minor changes to reduce unnecessary spl nesting.
Rewrote vm_page_alloc() to improve readability.
Various other mostly cosmetic changes.
1995-03-01 22:08:55 +00:00
David Greenman
54ab07303b Slight change to include file order to accommodate upcoming changes. 1995-03-01 21:37:44 +00:00
Bruce Evans
550f8550ec Replace all remaining instances of i386/include' by machine' and fix
nearby #include inconsistencies.
1995-02-26 05:14:53 +00:00
Poul-Henning Kamp
ca063ee672 Change EISA size to 256 instead of 4096.
Neither are correct, but 256 does least damage.
1995-02-25 20:26:14 +00:00
Poul-Henning Kamp
6e65a78aee Read K&R and get the { } right :-) 1995-02-25 18:55:53 +00:00
Poul-Henning Kamp
d8ee5072e3 I belive I finally got the "on eisa" right.
| if (!(isdp->id_iobase & 0xf300)) {
| 	printf(" on motherboard\n");
| } else if (isdp->id_iobase >= 0x1000 &&
| 	!(isdp->id_opbase & 0x300)) {
| 		printf (" on eisa slot %d\n",
| 			isdp->id_iobase >> 12);
| 	} else {
| 		printf (" on isa\n");
| 	}
| }

Based on info in "The undocumented PC" p.165
1995-02-25 18:29:10 +00:00
Stefan Eßer
781d9d4623 Keep PCI_CONF_MODE in a safe place for later reference, if #defined.
Reviewed by:	se
Submitted by:	seb@erix.ericsson.se (Sebastian Strollo)
1995-02-25 17:51:18 +00:00
Bruce Evans
7f3ae831f7 Submitted by: seb@erix.ericsson.se (Sebastian Strollo)
Remove over-cautious early fnop() synchronization.  It caused the probe to
hang on systems without an FPU.
1995-02-23 17:32:38 +00:00
David Greenman
68940ac1a0 Use of vm_allocate() and vm_deallocate() has been deprecated. 1995-02-20 22:23:31 +00:00
Bill Paul
188291d20f Do away with 'options SWAP_GENERIC' once and for all: I get ill
just thinking about it.

Two changes need to be made to allow 'config kernel swap generic' to
work properly without requiring any compile-time flags:

/usr/src/usr.sbin/config/mkswapconf.c: we need to define a dummy stub
for the setconf() function to replace the one in swapgeneric.c that
isn't available in non-generic configurations.

/usr/src/sys/i386/i386/autoconf.c: the -a boot flag causes setroot()
to be skipped and lets setconf() prompt the user for a root device.
If you skip setroot() in a non-generic kernel, you could get severely
hosed. To avoid this, we silently ignore the -a flag if rootdev != NODEV.
(rootdev is always initialized to NODEV in swapgeneric.c, so if
we find that rootdev is something other than NODEV, we know we're
not using a generic configuration.)
1995-02-18 18:05:35 +00:00
Bruce Evans
390784fbeb Undo the busy latch changes made in the previous revision. They broke
some 386/387 systems.

Don't print the IRQ number twice in the boot diagnostics.
1995-02-17 19:38:13 +00:00
Poul-Henning Kamp
648c711bb4 This is the latest version of the APM stuff from HOSOKAWA, I have looked
briefly over it, and see some serious architectural issues in this stuff.

On the other hand, I doubt that we will have any solution to these issues
before 2.1, so we might as well leave this in.

Most of the stuff is bracketed by #ifdef's so it shouldn't matter too much
in the normal case.

Reviewed by:	phk
Submitted by:	HOSOKAWA, Tatsumi <hosokawa@mt.cs.keio.ac.jp>
1995-02-17 02:22:57 +00:00
Bruce Evans
ceb91b3e4a Fix syntax errors in #ifdefed out code. 1995-02-16 13:21:47 +00:00
Joerg Wunsch
c851c2f0ea Include three lines about the pcvt console driver, so we don't ever need
a different config file for it.
1995-02-15 20:38:36 +00:00
David Greenman
919364ea6a Use proc0's proc struct rather than curproc's when calling sync. 1995-02-15 12:27:01 +00:00
David Greenman
7389231d06 Killed the pmap_use_pt and pmap_unuse_pt prototypes as they are now in
machine/pmap.h.
1995-02-15 04:36:31 +00:00
Søren Schmidt
1e1e0b4463 First attempt to run linux binaries. This is only the changes needed to
the generic kernel. The actual emulator is a separate LKM. (not finished
yet, sorry).
Submitted by:	sos@freebsd.org & sef@kithrup.com
1995-02-14 19:23:22 +00:00
Poul-Henning Kamp
ae4c9a0208 Removed a YF comment. 1995-02-14 18:01:24 +00:00
Poul-Henning Kamp
86ca01bcee Whoops! back out last commit partly. 1995-02-14 06:57:45 +00:00
Poul-Henning Kamp
b53d84607c YFfix. 1995-02-14 06:55:42 +00:00
Poul-Henning Kamp
f026fea644 susword -> systm.h 1995-02-14 06:51:31 +00:00
Poul-Henning Kamp
a3dbba7a60 Yves has sent us a ~600 Kb patch, which shuts up gcc entirely for the
entire kernel.
Unfortunately we didn't send him a copy of the style guide before he did it.
I'm trying to find all the benign and downright sound bits and will commit
them without any other explanation than "YF fix" if they are merely cosmetic.

Reviewed by:	phk
Submitted by:	yves@dutncp8.tn.tudelft.nl (Yves Fonk)
1995-02-14 06:00:17 +00:00
David Greenman
17703e4e91 Carefully choose the low limit for number of buffers to acheive the best
performance on small memory machines.
1995-02-12 09:21:04 +00:00
David Greenman
06031f1f3f Fixed a bogus comment and made a stylistic change (testl instead of orl
to test for zero).
1995-02-12 09:13:27 +00:00
Poul-Henning Kamp
499454c6e9 Intels App Note AP-485 applied.
We will now tell a good deal more about the CPU if Intel made it.

What is a i486DX2 Write-Back Enhanced CPU ?
1995-02-11 04:21:24 +00:00
David Greenman
459a929e36 Changed extended memory test so that it's non-destructive and not a
complete test (it never was "complete", which is why it was bogus). Now
only a single longword is checked in each page.
1995-02-10 07:44:03 +00:00
David Greenman
3c632e1f0c Removed obsolete and unused vmtime() function. 1995-02-10 07:17:46 +00:00
David Greenman
b1e4a738e0 Removed unnecessary check for pr_scale in the AST/OWEUPC case. 1995-02-10 06:43:47 +00:00
David Greenman
5a32829d98 Check P_PROFIL flag for profiling rather than pr_scale as it makes more
sense.
1995-02-10 06:25:14 +00:00
Stefan Eßer
6f22585dd4 Initialisation of interrupt masks changed.
Reviewed by:	se
Submitted by:	wolf (Wolfgang Stanglmeier)
1995-02-09 20:16:19 +00:00
Jordan K. Hubbard
11af896263 Add PPP to the generic kernel. Now that Poul has made us all this space,
maybe I can get us back into the slip/ppp game without having to tell users
to reconfigure their kernels all the time! :)
1995-02-09 11:21:07 +00:00
David Greenman
87bc4e696d Mostly cosmetic changes. Use KERNBASE instead of UPT_MAX_ADDRESS in
some comparisons as it is more correct (we want the kernel page tables
included).
Reorganized some of the expressions for efficiency.
Fixed the new pmap_prefault() routine - it would sometimes pick up the
wrong page if the page in the shadow was present but the page in object
was paged out. The routine remains unused and commented out, however.
Explicitly free zero reference count page tables (rather than waiting
for the pagedaemon to do it).

Submitted by:	John Dyson
1995-02-02 08:45:14 +00:00
Stefan Eßer
fe90a500af Reviewed by: se
Submitted by:	wolf (Wolfgang Stanglmeier)
PCI specific code moved to /sys/pci.
1995-02-01 23:11:38 +00:00
Stefan Eßer
ac19f91802 Reviewed by: se
Submitted by:	wolf (Wolfgang Stanglmeier)
New ISA dependend file for PCI bus support.
Replaces sys/i386/pci/pcibios.c.
1995-02-01 23:06:58 +00:00
Bruce Evans
15e633f0d9 Fix disassembly of `bt[crs] $Ib,E'. 1995-01-29 02:38:15 +00:00
Andreas Schulz
aa98692ffb Correct a name of one structure member in the sigaltstack structure.
Now it matches the man page and also the only other commercial implementation
i have found so far ( Solaris 2.x).
Changed the name from ss_base to ss_sp.
1995-01-29 01:19:25 +00:00
Jordan K. Hubbard
f1780a6c25 Add soundblaster CD to generic kernel. Hope this doesn't run us out
of space!
1995-01-28 05:01:43 +00:00
Poul-Henning Kamp
e05407d84b New and far better NCR5380/NCR53400 scsi-driver.
Handles at least Trantor T130 and ProAudioSpectrum adapters.
The pas driver has consequently been removed.
This driver can be configured without without interrupts.

Manpage to follow when PAS16 has been edited in.

Reviewed by:	phk
Submitted by:	Serge Vakulenko, <vak@cronyx.ru>
1995-01-27 07:49:19 +00:00
David Greenman
7a642ab589 Fix from Doug Rabson for a panic related to not initializing the kernel's
PTD.

Submitted by:	 John Dyson
1995-01-26 21:06:40 +00:00
Andrey A. Chernov
87fcda4634 Remove FAT_CURSOR, it is already non-existent during several
last syscons versions
1995-01-26 05:04:37 +00:00
David Greenman
d3a10e2cad Comment out pmap_prefault for the time being (perhaps until after 2.1).
The object_init_pt routine is still enabled and used, however, and this
is where most of the 'pre-faulting' performance improvement comes from.
1995-01-26 01:45:02 +00:00
David Greenman
3edf89fe83 Make sure that the pages being 'pre-faulted' are currently on a queue. 1995-01-26 00:55:03 +00:00
David Greenman
6100ed1d12 Be a bit less fast and loose about setting non-cacheablity of pages. 1995-01-25 22:06:23 +00:00
Bruce Evans
b5d89ca8ad Load the kernel symbol table in the boot loader and not at compile time.
(Boot with the -D flag if you want symbols.)

Make it easier to extend `struct bootinfo' without losing either forwards
or backwards compatibility.

ddb_aout.c:
Get the symbol table from wherever the loader put it.
Nuke db_symtab[SYMTAB_SPACE].

boot.c:
Enable loading of symbols.  Align them on a page boundary.  Add printfs
about the symbol table sizes.
Pass the memory sizes to the kernel.
Fix initialization of `unit' (it got moved out of the loop).
Fix adding the bss size (it got moved inside an ifdef).
Initialize serial port when RB_SERIAL is toggled on.
Fix comments.
Clean up formatting of recently added code.

io.c:
Clean up formatting of recently added code.

netboot/main.c, machdep.c, wd.c:
Change names of bootinfo fields.

LINT:
Nuke SYMTAB_SPACE.
Fix comment about DODUMP.

Makefile.i386:
Nuke use of dbsym.
Exclude gcc symbols from kernel unless compiling with -g.
Remove unused macro.
Fix comments and formatting.

genassym.c:
Generate defines for some new bootinfo fields.  Change names of old ones.

locore.s:
Copy only the valid part of the `struct bootinfo' passed by the loader.
Reserve space for symbol table, if any.

machdep.c:
Check the memory sizes passed by the loader, if any.  Don't use them yet.

bootinfo.h:
Add a size field so that we can resolve some mismatches between the loader
bootinfo and the kernel boot info.  The version number is not so good for
this because of historical botches and because it's harder to maintain.
Add memory size and symbol table fields.  Change the names of everything.

Hacks to save a few bytes:

asm.S, boot.c, boot2.S:
Replace `ouraddr' by `(BOOTSEG << 4)'.

boot.c:
Don't statically initialize `loadflags' to 0.  Disable the "REDUNDANT"
code that skips the BIOS variables.  Eliminate `total'.  Combine some
more printfs.

boot.h, disk.c, io.c, table.c:
Move all statically initialzed data to table.c.

io.c:
Don't put the A20 gate bits in a variable.
1995-01-25 21:40:47 +00:00
Jean-Marc Zucconi
3bc6bf1734 Changed address of the game controller to 0x201 (was 0x200)
joy.c: joystick driver
1995-01-25 20:11:51 +00:00
Paul Richards
94187a78bf is to lnc changes 1995-01-24 20:38:39 +00:00
David Greenman
fff3cea1a9 Moved various pmap 'bit' test/set functions back into real functions; gcc
generates better code at the expense of more of it.

Submitted by:	John Dyson
1995-01-24 09:57:39 +00:00
David Greenman
fbdfe8ac22 Changed buffer allocation policy (machdep.c)
Moved various pmap 'bit' test/set functions back into real functions; gcc
generates better code at the expense of more of it. (pmap.c)
Fixed a deadlock problem with pv entry allocations (pmap.c)
Added a new, optional function 'pmap_prefault' that does clustered page
table preloading (pmap.c)
Changed the way that page tables are held onto (trap.c).

Submitted by:	John Dyson
1995-01-24 09:56:33 +00:00
Bruce Evans
1a0518966d Don't use mi_switch() to terminate cpu_exit(). Calling it just happened to
work (mi_switch() counted the last timeslice again but this didn't affect
the exiting process' rusage because the rusage has already been finalized).

Remove stale comment.
1995-01-21 15:34:03 +00:00
Bruce Evans
cee6d3700d Remove unused definitions of vm statistics counters. Most of the
counting is now done in C.  There are still about 100 unused
definitions for other things.
1995-01-21 15:22:28 +00:00
Bruce Evans
e6891db8c5 Don't count context switches here, they are already counted in mi_switch(). 1995-01-21 15:20:23 +00:00
Andreas Schulz
c82762a9c3 Submitted by: Bruce Evans
Put in the much shorter and cleaner version for the calibrate_cycle_counter
for the Pentium that Bruce suggested. Tested here on my Pentium  and
it works okay.
1995-01-19 22:05:27 +00:00
Bruce Evans
2d2fb1bf6b The %eflags checking introduced in the previous commit was too zealous.
sigreturn() sometimes failed for ordinary returns from signal handlers.
Failures of ordinary returns "can't happen" and are badly handled.
"Temporary" fix: allow users to corrupt PSL_RF.  This is fairly
harmless.  A correct fix would involve saving the old %eflags (and
perhaps the old segment registers) where the user can't get at them.
1995-01-17 01:15:12 +00:00
David Greenman
7082ec8aa5 Fixed some page table reference count problems; these changes may not be
complete, but should be closer to correct than before.
1995-01-15 09:06:23 +00:00
Bruce Evans
20415301cd Fix security holes in sigreturn(), ptrace() and procfs. sigreturn()
attempted to check for insecure and fatal eflags and segment
selectors, but missed many cases and got the IOPL check back to
front.  The other syscalls didn't check at all.

sys_process.c, machdep.c:
Only allow PT_WRITE_U to write to the registers (ordinary and FP).

psl.h, locore.s, machdep.c:
Eliminate PSL_MBZ, PSL_MBO and PSL_USERCLR.  We are not supposed
to assume anything about the reserved bits.  Use PSL_USERCHANGE
and PSL_KERNEL instead.  Rename PSL_USERSET to PSL_USER.

exception.s:
Define a private label for use by doreti when returning to user
mode fails.

machdep.c:
In syscalls, allow changing only the eflags that can be changed on
486's in user mode (no longer attempt to allow benign IOPL changes;
allow changing the nasty PSL_NT; don't allow changing the i586
bits).

Don't attempt to check all the cases involving invalid selectors
and %eip's.  Just check for privilege violations and let the invalid
things cause a trap.

procfs_machdep.c:
Call the ptrace register functions to do all the work for reading
and writing ordinary registers and for single stepping.

trap.c:
Ignore traps caused by PSL_NT being set.  Previously, users could
cause a fatal trap in user mode by setting PSL_NT and executing an
iret, and a fatal trap in kernel mode by setting PSL_NT and making
a syscall.  PSL_NT was cleared too late and not in enough modes to
fix the problem.

Make all traps in user mode (except T_NMI) nonfatal.

Recover from traps caused by attempting to load invalid user
registers in doreti by restarting the traps so that they appear to
occur in user mode.
---

Fix bogons that I noticed while fixing the above:

psl.h:
Fix some comments.

Uniformize idempotency ifdef.

exception.s, machdep.c:
Remove rsvd[0-14].  rsvd0 hasn't been reserved since the 486 came
out.  Replace rsvd0 by `align'.  rsvd[0-11] used wrong (magic
non-unique) trap numbers.  Replace rsvd[1-14] by rsvd.

locore.s:
Enable alignment check flag on 486's and 586's.

machdep.c:
Use a better type for kstack[].

Use TFREGP() to find the registers.

Reformat ptrace functions from SEF to something closer to KNF.

procfs_machdep.c:
The wrong pointer to the registers got fixed as a side effect.

Implement reading and writing of FP registers.

/proc/*/*regs now work (only) for processes that are in memory.

Clean up comments.

trap.c, trap.h:
Remove unused trap types.
1995-01-14 13:20:26 +00:00
Jordan K. Hubbard
9949564470 Remove bogus scd0 driver - I should have looked at LINT first, anyway. 1995-01-14 10:48:56 +00:00
Bruce Evans
3117fbd98e Enable define of CR0_AM to prepare for implementing alignment checking.
Uniformize idempotency ifdef.
1995-01-14 10:44:55 +00:00
Bruce Evans
c277f99332 Declare a real `struct fpreg' to prepare for implementing reading and
writing of FP regs for procfs.

Uniformize idempotency ifdef.
1995-01-14 10:41:41 +00:00
Bruce Evans
1e1a3d012d Remove reference to impossible trap type T_KDBTRAP. We don't support
watchpoints.

Uniformize idempotency ifdef.
1995-01-14 10:34:52 +00:00
Bruce Evans
9bf308efab Eliminate T_KDBTRAP, which will soon go away. It was only used for an
unreachable case label in kdb_trap().

Use the correct case labels in kdb_trap() so that normal ddb entry doesn't
print a message.

Change all printf's to db_printf's.  Now you can put a breakpoint at printf,
and ddb entry messages don't spam the syslog output.

Cosmetic:

Use ISPL() instead of magic numbers.

Don't compile the unused function kdb_kbd_trap().

Improve some asms.

Print the arg to Debugger().
1995-01-14 10:24:48 +00:00
David Greenman
92c385361b Add missing object_lock/unlock. 1995-01-14 04:58:53 +00:00
Jordan K. Hubbard
0dd1eea105 Put UCONSOLE back - I was wrong, it's still used in one last place.
Submitted by:	ollivier
1995-01-14 02:39:22 +00:00
Justin T. Gibbs
451ab98ff3 Add in aic7770.c (EISA/VL Adaptors) and aic7870.c (PCI adaptor) dependancies
for the ahc driver.
1995-01-13 02:23:27 +00:00
Jordan K. Hubbard
09c42f85eb 1. Remove UCONSOLE. This appears to be well and truly dead (unless it's
hiding someplace in /sys I can't find).
2. Remove NCONS.  Soren's latest changes make it a no-op.
1995-01-12 15:37:16 +00:00
Jordan K. Hubbard
6722294de8 Change GENERIC to SWAP_GENERIC for now. I need the GENERIC kernel to
build by default again!  When the furor subsides, maybe something better
can be done, but..
1995-01-11 17:51:26 +00:00
David Greenman
0d94caffca These changes embody the support of the fully coherent merged VM buffer cache,
much higher filesystem I/O performance, and much better paging performance. It
represents the culmination of over 6 months of R&D.

The majority of the merged VM/cache work is by John Dyson.

The following highlights the most significant changes. Additionally, there are
(mostly minor) changes to the various filesystem modules (nfs, msdosfs, etc) to
support the new VM/buffer scheme.

vfs_bio.c:
Significant rewrite of most of vfs_bio to support the merged VM buffer cache
scheme.  The scheme is almost fully compatible with the old filesystem
interface.  Significant improvement in the number of opportunities for write
clustering.

vfs_cluster.c, vfs_subr.c
Upgrade and performance enhancements in vfs layer code to support merged
VM/buffer cache.  Fixup of vfs_cluster to eliminate the bogus pagemove stuff.

vm_object.c:
Yet more improvements in the collapse code.  Elimination of some windows that
can cause list corruption.

vm_pageout.c:
Fixed it, it really works better now.  Somehow in 2.0, some "enhancements"
broke the code.  This code has been reworked from the ground-up.

vm_fault.c, vm_page.c, pmap.c, vm_object.c
Support for small-block filesystems with merged VM/buffer cache scheme.

pmap.c vm_map.c
Dynamic kernel VM size, now we dont have to pre-allocate excessive numbers of
kernel PTs.

vm_glue.c
Much simpler and more effective swapping code.  No more gratuitous swapping.

proc.h
Fixed the problem that the p_lock flag was not being cleared on a fork.

swap_pager.c, vnode_pager.c
Removal of old vfs_bio cruft to support the past pseudo-coherency.  Now the
code doesn't need it anymore.

machdep.c
Changes to better support the parameter values for the merged VM/buffer cache
scheme.

machdep.c, kern_exec.c, vm_glue.c
Implemented a seperate submap for temporary exec string space and another one
to contain process upages. This eliminates all map fragmentation problems
that previously existed.

ffs_inode.c, ufs_inode.c, ufs_readwrite.c
Changes for merged VM/buffer cache.  Add "bypass" support for sneaking in on
busy buffers.

Submitted by:	John Dyson and David Greenman
1995-01-09 16:06:02 +00:00
Andreas Schulz
a9700525d8 Work around a compiler bug in gcc2.6.3 in handling (long long) variables and
shifting. Also correct the original code as Garrett noticed it in mail.
Leave the mishandled code in to use it later if future versions of gcc
are correct. The code was part of the calibrate_cyclecounter routine to
get the speed of the pentium chip.
1995-01-07 17:26:35 +00:00
Jordan K. Hubbard
2f6df2645b Gunther Schadow <gusw@fub46.zedat.fu-berlin.de>'s
driver for the Genius GS-4500 hand scanner.
Submitted by:	gusw@fub46.zedat.fu-berlin.de
1995-01-07 14:52:08 +00:00
Stefan Eßer
623976474c Submitted by: Wolfgang Stanglmeier <wolf@dentaro.GUN.de>
Reviewed by: <wollman>
First hooks and defines for the ISDN driver,
that soon will see the light ...
1995-01-05 19:51:51 +00:00
David Greenman
b5ba45f6f3 Corrected the list of volatile registers for outsb, outsw, and outsl.
This bug caused my ethernet driver to break, among other things no doubt.
1995-01-04 20:42:25 +00:00
Bruce Evans
37e52b59cc Use sufficient parentheses in macros.
Remove bogus input operands for fnsave(), fnstcw() and fnstsw().

Change all fwait's to fnop's.  This might help avoid hardware bugs.
Wait after fninit with an fnop.  This should be safer now.

Fix some spelling and formatting errors.

Use natural sizes for control and status words (u_short, promotes to int).

Don't clobber the SWI_CLOCK_MASK bits in npx0_imask when using IRQ13.

Set the devconf state correctly (always busy, if configured).  Improve
code for npx_registerdev() a little (gcc can't keep id->id_unit in a
register for some reason).  Don't register a nonexistent npx device.

Print a useful message in npxattach() again (delete references to errors
and not the whole message).  Don't print "387 emulator" if there is no
emulator in the kernel.

Use %p for pointers in error messages.

Don't clobber the FPU state when there is an FPU exception.  Just clear
the exception flags (after saving the flags as before).  This allows
debuggers and SIGFPE handlers to look at the full exception state.
SIGFPE handlers should normally return via longjmp(), which restores a
good FPU state (as before).  Returning from a SIGFPE handler may leave
the FPU in the wrong state (as before).

Clear the busy latch _after_ clearing the exception flags so that there
is less chance of getting a bogus h/w interrupt for a control operation.

Clear the saved exception status word when the next FPU instruction is
excuted so that it doesn't stick around until the next exception.

Clear the busy latch after fnsave() in npxsave() in case it was set when
npxsave() was called.
1995-01-03 04:00:06 +00:00
Bruce Evans
d5ebbddc5e Replace sv_ex_tw by padding (it is no longer used; the tag word in sv_env
is valid).

Expand comment about bogus padding for emulators.

Update prototpe for npxinit().
1995-01-03 03:57:46 +00:00
Jordan K. Hubbard
dd4a485085 From Bill Paul:
- /sys/i386/i386/swapgeneric.c is just plain broke. But fear not, for I
  have unbroken it. One thing that swapgeneric.c does is walk through the
  list of configured devices searching for a boot device. The only easy
  way to accomplish this in 2.0 is to use Garret Wollman's kern_devconf
  stuff. *BUT*, the head of the kern_devconf linked list (dc_list) is declared
  static in /sys/kern/kern_devconf.c. This means that swapgeneric.c can't
  see it at link time. I had to remove the 'static' keyword to get around
  this little problem. I hope this doesn't break anything anywhere.

  *Furthermore,* there's a small matter of making the call to setconf()
  in swapgeneric.c disappear when 'config kernel swap generic' isn't used.
  You could change /sbin/config to create a dummy setconf() function in
  swapkernel.c, but that seems messy somehow. (It's also someting of an
  'it isn't broken, why are you fixing it' situation.) My solution was to
  do what the NetBSD people did and put an #ifdef GENERIC around the call
  to setconf(). If your kernel is called GENERIC or you define 'options
  GENERIC,' then you can use 'config kernel swap generic' and it'll work.

  That aside, the upshot is that: a) swapgeneric.c actually works, and
  and b) the -a boot flag now works as well. If you boot with -a, as in
  "Boot: wd(0,a)/kernel -a" you will be presented with a 'root device?'
  prompt after the autoconfig phase, at which point you can specify what
  device you want mounted as root. Regrettably, you can't specify an NFS
  filesystem. Yet. Three files are affected: /sys/i386/i386/swapgeneric.c,
  /sys/i386/i386/autoconf.c and /sys/kern/kern_devconf.c.

Submitted by:	wpaul
1994-12-31 17:11:59 +00:00
Bruce Evans
43469be308 icu.s:
Move definition of `stat_imask' to clock.c.

clock.c:
Rename `rtcmask' to `stat_imask' and export it.  Rename `clkmask' to
`clk_imask' for consistency.

Only calculate TIMER_DIV(hz) once.

Merge debugging and "garbage" code to produce debugging code and format the
output better.

Make writertc() static inline and use it everywhere.  Now all accesses to
the clock registers go through rtcin() and writertc().

Move rtc initialization to cpu_initclocks().

Merge enablertclock() with cpu_initclocks() and remove enablertclock().
The extra entry point was just a leftover from 1.1.5.
1994-12-30 12:43:35 +00:00
Bruce Evans
13d7c724ca Obtained from: 1.1.5
Fix single-stepping of emulated FPU instructions.

Don't panic if an FPU instruction is attempted but there is no FPU
and no FPU emulator is configured.
1994-12-24 07:22:58 +00:00
David Greenman
94101b5208 Move page_unhold's in pmap_object_init_pt down one line to gard against
a potential race condition.
1994-12-18 14:16:22 +00:00
Jordan K. Hubbard
76fe9b2793 Add a 'vn' to GENERIC 1994-12-18 12:01:40 +00:00
David Greenman
931bde7f72 Check for PG_FAKE too in pmap_object_init_pt. 1994-12-18 03:36:27 +00:00
David Greenman
d9b026fcbd Add two more page table pages to keep 64MB machines happy. 1994-12-18 03:11:46 +00:00
Poul-Henning Kamp
784cf072d8 Remove sd1-sd3 & st1, now that we can autoallocate them.
fix the vn driver in LINT.  It autoallocates too.

Reviewed by:	phk
Submitted by:	rgrimes
1994-12-16 06:04:16 +00:00
David Greenman
c8a62b4bc5 Removed inappropriate comment. 1994-12-11 03:33:58 +00:00
David Greenman
d83ea8bcbd Add additional comment. 1994-12-11 03:11:23 +00:00
David Greenman
32b88083a9 Fix bogus comment. 1994-12-11 02:28:36 +00:00
Bruce Evans
91290462f6 Disable CLKF_BASEPRI() again. I forgot to edit an unwanted change out of
the diffs for the previous commit.
1994-12-03 10:18:24 +00:00
Bruce Evans
b39b673d37 i386/exception.s,
Keep track of interrupt nesting level.  It is normally 0
	for syscalls and traps, but is fudged to 1 for their exit
	processing in case they metamorphose into an interrupt
	handler.

i386/genassym.c;
	Remove support for the obsolete pcb_iml and pcb_cmap2.

	Add support for pcb_inl.

i386/swtch.s:
	Fudge the interrupt nesting level across context switches and in
	the idle loop so that the work for preemptive context switches
	gets counted as interrupt time, the work for voluntary context
	switches gets counted mostly as system time (the part when
	curproc == 0 gets counted as interrupt time), and only truly idle
	time gets counted as idle time.

	Remove obsolete support (commented out and otherwise) for pcb_iml.

	Load curpcb just before curproc instead of just after so that
	curpcb is always valid if curproc is.  A few more changes like
	this may fix tracing through context switches.

	Remove obsolete function swtch_to_inactive().

include/cpu.h:
	Use the new interrupt nesting level variable to implement a
	non-fake CLF_INTR() so that accounting for the interrupt state
	works.

	You can use top, iostat or (best) an up to date systat to see
	interrupt overheads.  I see the expected huge interrupt overheads
	for ISA devices (on a 486DX/33, about 55% for an IDE drive
	transferring 1250K/sec and the same for a WD8013EBT network card
	transferring 1100K/sec).  The huge interrupt overheads for serial
	devices are unfortunately normally invisible.

include/pcb.h:
	Remove the obsolete pcb_iml and pcb_cmap2.  Replace them by
	padding to preserve binary compatibility.

	Use part of the new padding for pcb_inl.

isa/icu.s:
isa/vector.s:
	Keep track of interrupt nesting level.
1994-12-03 10:03:19 +00:00