Commit Graph

1935 Commits

Author SHA1 Message Date
Luoqi Chen
bc3101cc77 Save common_tssd before it's loaded and the busy bit set.
Submitted by:	bde
1999-06-28 15:34:54 +00:00
Peter Wemm
320138da4c Use the same -UKERNEL strategy as the alpha to avoid the inlines etc. 1999-06-28 09:21:41 +00:00
Alan Cox
fd56d8b7fe An SMP-specific change: Remove an unnecessary lock acquire and release
from every system call.  (Storing a 32-bit constant is inherently
atomic.)

Reviewed by:	Matthew Dillon <dillon@apollo.backplane.com>
1999-06-27 21:31:43 +00:00
Peter Wemm
e66b7bac41 Shut up gcc. 1999-06-27 09:08:48 +00:00
Jonathan Lemon
7eb56d9409 Fix warning message; that was 4GB, not 2GB. I apparently can't do
arithmetic today.
1999-06-24 20:53:24 +00:00
Jonathan Lemon
4547fffaa1 Explicitly ignore any memory > 2GB, we don't support it yet. 1999-06-24 20:47:11 +00:00
Jonathan Lemon
8fa445082f Only include AMD wt_alloc routines if I586_CPU is defined. Fixes
CPU_WT_ALLOC for cyrix chips.

Submitted by:	"Brian Smith" <dbsoft@technologist.com>
1999-06-24 20:08:56 +00:00
Brian Feldman
9840e7cb5a This commit gives support for the Rise mP6 CPU. It has two changes:
1. Rise is recognized in identdcpu.c.
	2. The TSC is not written to. A workaround for the CPU bug is being
	   applied to clock.c (the bug being that the mP6 has TSC enabled
	   in its CPUID-capabilities, but it only supports reading it. If we
	   try to write to it (MSR 16), a GPF occurs.) The new behavior is that
	   FreeBSD will _not_ zero the TSC. Instead, we do a bit of 64-bit
	   arithmetic.

Reviewed by:	msmith
Obtained from:	unfurl & msmith
1999-06-24 03:48:25 +00:00
Mike Smith
d42c1ee5c3 Changes in the way that the APs are started appears to have removed the
problem with having more CPUs than NCPU.

PR:		kern/4255
Submitted by:	peter
1999-06-23 23:02:38 +00:00
Luoqi Chen
541e018708 Do not setup 4M pdir until all APs are up. 1999-06-23 21:47:24 +00:00
Mike Smith
b9ab2461b6 Remove an unnecessary panic when sparse PCI bus numbering is encountered.
This is found eg. on some Compaq  Proliant systems.

Submitted by:	peter
1999-06-22 20:54:25 +00:00
Jordan K. Hubbard
d571daa00c Clean up some of the documentation at the top. 1999-06-20 03:36:46 +00:00
Brian Feldman
6b32f7692f Harmless change to prevent possible problems in the future. I made
sure that i686_mem was only used when
	1. CPUID had MTRR set (this was there before)
	2. the CPU was GenuineIntel (not there)
	3. the CPU is a 686 (also not there)

This should prevent any problems with CPUs that set MTRR but aren't
compatibile with Intel's interface (none that I know of yet.)
1999-06-18 19:24:40 +00:00
Bruce Evans
50045fbc7c Changed the global `idt' from an array to a pointer so that npx.c
automatically hacks on the active copy of the IDT if f00f_hack()
has changed it.  This also allows simplifications in setidt().
This fixes breakage of FP exception handling by rev.1.55 of
sys/kernel.h.  FP exceptions were sent to npx.c's probe handlers
because npx.c "restored" the old handlers to the wrong copy of the
IDT.  The SYSINIT for f00f_hack() was purposely run quite late to
avoid problems like this, but it is bogusly associated with the
SYSINIT for proc0 so it was moved with the latter.

Problem reported and fix tested by:  Martin Cracauer <cracauer@cons.org>
1999-06-18 14:32:21 +00:00
Tor Egge
a31bad69da Clean up bitrot in interrupt tracing code. 1999-06-16 03:53:52 +00:00
Dag-Erling Smørgrav
9b953cf681 Kill option FAILSAFE.
PR:		i386/12187
Approved by:	bde
1999-06-15 13:14:56 +00:00
Alan Cox
dabd891d6e Use pmap_kenter instead of pmap_enter to map the message buffer. 1999-06-13 19:20:25 +00:00
Jonathan Lemon
5a86dd8c67 Change variable used for calculating ending address of physical memory
from 'int' to 'vm_offset_t'.

Spotted by:	 Richard Cownie <tich@ma.ikos.com>
1999-06-10 02:48:51 +00:00
Dmitrij Tejblum
2105375397 Use kmem_alloc_nofault() rather than kmem_alloc_pageable() to allocate
kernel virtual address space for UPAGES.
1999-06-08 17:14:22 +00:00
Luoqi Chen
31fdd69a1f Fix an accounting problem when prefaulting 4M pages.
PR:		kern/11948
1999-06-05 16:16:37 +00:00
Peter Wemm
e6eca02874 remove references to isa_device, it's no longer associated with interrupts. 1999-06-03 20:41:00 +00:00
Jonathan Lemon
26f13ad079 Unbreak memory sizing for SMP. 1999-06-01 23:45:48 +00:00
Poul-Henning Kamp
6fcd8a7c93 Introduce the makebdev() function, it does the same as the makedev()
function for now, but that will change.
1999-06-01 18:56:26 +00:00
Jonathan Lemon
4065a35af3 Null commit; note that there is a new memory sizing routine that uses
the BIOS calls to determine the memory configuration.  This should fix
problems with >64M for good.

Reviewed by:	Mike Smith
1999-06-01 18:25:26 +00:00
Jonathan Lemon
eb9d435ae7 Unifdef VM86.
Reviewed by:	silence on on -current
1999-06-01 18:20:36 +00:00
Doug Rabson
3bfc7e5928 Remove fd driver from its old home and change files which include rtc.h
to account for its new location.
1999-05-31 18:36:14 +00:00
Poul-Henning Kamp
2447bec829 Simplify cdevsw registration.
The cdevsw_add() function now finds the major number(s) in the
struct cdevsw passed to it.  cdevsw_add_generic() is no longer
needed, cdevsw_add() does the same thing.

cdevsw_add() will print an message if the d_maj field looks bogus.

Remove nblkdev and nchrdev variables.  Most places they were used
bogusly.  Instead check a dev_t for validity by seeing if devsw()
or bdevsw() returns NULL.

Move bdevsw() and devsw() functions to kern/kern_conf.c

Bump __FreeBSD_version to 400006

This commit removes:
        72 bogus makedev() calls
        26 bogus SYSINIT functions

if_xe.c bogusly accessed cdevsw[], author/maintainer please fix.

I4b and vinum not changed.  Patches emailed to authors.  LINT
probably broken until they catch up.
1999-05-31 11:29:30 +00:00
Poul-Henning Kamp
4e2f199e0c This commit should be a extensive NO-OP:
Reformat and initialize correctly all "struct cdevsw".

        Initialize the d_maj and d_bmaj fields.

        The d_reset field was not removed, although it is never used.

I used a program to do most of this, so all the files now use the
same consistent format.  Please keep it that way.

Vinum and i4b not modified, patches emailed to respective authors.
1999-05-30 16:53:49 +00:00
Doug Rabson
8b05278ca1 Allow up to 8 ports, 4 memory regions and two irqs and drqs. 1999-05-30 11:05:39 +00:00
Doug Rabson
319e3d3049 Activate/deactivate resources by calling the method, not through the
resource manager automatic handling of RF_ACTIVE.
1999-05-30 10:50:57 +00:00
Poul-Henning Kamp
6deb5a62cc Stop the TSC from being used as timecounter on K5/step0 machines. 1999-05-29 06:57:55 +00:00
Bruce Evans
b50641ef9c Fixed glitches (jumps) of about 1/HZ seconds for the i8254 timecounter.
The old version only worked right when the time was read strictly
more often than every 1/HZ seconds, but we only guarantee reading
it every (1/HZ + epsilon) seconds.  Part of rev.1.126-1.127 attempted
to fix this but didn't succeed.  Detect counter rollover using the
heuristic from the old version of microtime() with additional
complications for supporting calls from fast interrupt handlers.
This works provided i8254 interrupts are not delayed by more than
1/(2*HZ) seconds.

This needs more comments, and cleanups for the SMP case, and more
testing of the SMP case before it is merged into RELENG_3.

Tested by:		jhay
1999-05-28 14:08:59 +00:00
Alan Cox
72e51821d7 pmap_object_init_pt:
The size of vm_object::memq is vm_object::resident_page_count,
	not vm_object::size.
1999-05-28 05:38:56 +00:00
John Birrell
4d562a18fc - Make setroot() conditional on FFS etc, to avoid a compiler warning
on systems with no FFS.
- Remove all references to mfs from cpu_rootconf(). mfs_init is
  called prior to cpu_rootconf(), so it can set mountrootfsname to mfs
  and (more imporantly) set rootdev using the (bogus in Bruce's opinion)
  special major number of 255.
1999-05-24 00:30:49 +00:00
Doug Rabson
a3be63b3ce * Factor out the common code between the isa bus drivers for i386 and alpha.
* Re-work the resource allocation code to use helper functions in subr_bus.c.
* Add simple isa interface for manipulating the resource ranges which can be
  allocated and remove the code from isa_write_ivar() which was previously
  used for this purpose.
1999-05-22 15:18:28 +00:00
Peter Wemm
2b5be3fad4 Recover from removing the last (unshared) interrupt handler.
PR:		11806
Submitted by:	Assar Westerlund <assar@sics.se>
1999-05-22 09:39:31 +00:00
Bill Paul
ab431312b4 This commit adds driver support for PCI fast ethernet cards based on the
ADMtek AL981 "Comet" chipset. The AL981 is yet another DEC tulip clone,
except with simpler receive filter options. The AL981 has a built-in
transceiver, power management support, wake on LAN and flow control.
This chip performs extremely well; it's on par with the ASIX chipset
in terms of speed, which is pretty good (it can do 11.5MB/sec with TCP
easily).

I would have committed this driver sooner, except I ran into one problem
with the AL981 that required a workaround. When the chip is transmitting
at full speed, it will sometimes wedge if you queue a series of packets
that wrap from the end of the transmit descriptor list back to the
beginning. I can't explain why this happens, and none of the other tulip
clones behave this way. The workaround this is to just watch for the end
of the transmit ring and make sure that al_start() breaks out of its
packet queuing loop and waiting until the current batch of transmissions
completes before wrapping back to the start of the ring. Fortunately, this
does not significantly impact transmit performance.

This is one of those things that takes weeks of analysis just to come
up with two or three lines of code changes.
1999-05-21 04:37:48 +00:00
Nick Hibma
f26c33d249 usbdi.h:
Implement priorities.
GENERIC, LINT, files:
        Remove remarks about ordering of device names.
GENERIC, LINT:
        Sort the devices alphabetically in LINT and GENERIC.
1999-05-20 20:02:37 +00:00
Peter Wemm
8dc26439da Move pcibus (host -> pci bus) probe/attach routines from nexus
to pcibus.c.  pci_cfgopen() becomes static and there are no more
bus #ifdef's in nexus.c.
1999-05-18 20:48:43 +00:00
Alan Cox
88b67a96af pmap_qremove:
Eliminate unnecessary TLB shootdowns.
1999-05-18 06:01:49 +00:00
Peter Wemm
2f2ffb8d2c Don't hardcode IRQ 13 for NPX. It's as good as hardwired in the hardware
though, on systems (386 mostly) that still have a seperate fpu, but it
might be possible to find systems where the FPU coprocessor is wired to
a different IRQ pin.
1999-05-15 17:58:58 +00:00
Doug Rabson
6c2e3dde8c * Define a new static method DEVICE_IDENTIFY which is called to add device
instances to a parent bus.
* Define a new method BUS_ADD_CHILD which can be called from DEVICE_IDENTIFY
  to add new instances.
* Add a generic implementation of DEVICE_PROBE which calls DEVICE_IDENTIFY
  for each driver attached to the parent's devclass.
* Move the hint-based isa probe from the isa driver to a new isahint driver
  which can be shared between i386 and alpha.
1999-05-14 11:22:47 +00:00
David E. O'Brien
282462f969 Add the `xe' Xircom PC Card driver. 1999-05-14 03:57:25 +00:00
Bruce Evans
4daefb91bf Renamed the private copies of strlen and strcpy to gdb_strlen and
gdb_strcpy, respectively.  This saves fixing the wrong return type
of the private strlen and makes the addresses of strlen and strcpy
unambiguous.
1999-05-13 07:34:25 +00:00
Luoqi Chen
0f0fe5a4c5 Unbreak VESA on SMP. 1999-05-12 21:39:07 +00:00
Luoqi Chen
2ee16532b6 VM86_FRAMESIZE is now the size of vm86 frame, not the number of 4-byte words.
Requested by:	Bruce
1999-05-12 21:30:51 +00:00
Poul-Henning Kamp
02342b0cfe Fix dumpon. It passes a udev_t from userland to kernel, that needs a
udev2dev() before we use it.

It really should pass a name like swapon does.
1999-05-12 07:40:50 +00:00
Poul-Henning Kamp
bfbb9ce670 Divorce "dev_t" from the "major|minor" bitmap, which is now called
udev_t in the kernel but still called dev_t in userland.

Provide functions to manipulate both types:
        major()         umajor()
        minor()         uminor()
        makedev()       umakedev()
        dev2udev()      udev2dev()

For now they're functions, they will become in-line functions
after one of the next two steps in this process.

Return major/minor/makedev to macro-hood for userland.

Register a name in cdevsw[] for the "filedescriptor" driver.

In the kernel the udev_t appears in places where we have the
major/minor number combination, (ie: a potential device: we
may not have the driver nor the device), like in inodes, vattr,
cdevsw registration and so on, whereas the dev_t appears where
we carry around a reference to a actual device.

In the future the cdevsw and the aliased-from vnode will be hung
directly from the dev_t, along with up to two softc pointers for
the device driver and a few houskeeping bits.  This will essentially
replace the current "alias" check code (same buck, bigger bang).

A little stunt has been provided to try to catch places where the
wrong type is being used (dev_t vs udev_t), if you see something
not working, #undef DEVT_FASCIST in kern/kern_conf.c and see if
it makes a difference.  If it does, please try to track it down
(many hands make light work) or at least try to reproduce it
as simply as possible, and describe how to do that.

Without DEVT_FASCIST I belive this patch is a no-op.

Stylistic/posixoid comments about the userland view of the <sys/*.h>
files welcome now, from userland they now contain the end result.

Next planned step: make all dev_t's refer to the same devsw[] which
means convert BLK's to CHR's at the perimeter of the vnodes and
other places where they enter the game (bootdev, mknod, sysctl).
1999-05-11 19:55:07 +00:00
Luoqi Chen
cd121c9cae Yet another place I missed when increasing trapframe size, which causes problem
to SIGFPE handling.

Reviewed by:	Bruce Evans	<bde@zeta.org.au>
1999-05-11 16:29:21 +00:00
Luoqi Chen
fcfe0b7b48 Do not hardcode size of struct vm86frame.
Submitted by:	Jonathan Lemon <jlemon@americantv.com>
1999-05-11 16:04:40 +00:00