Commit Graph

6343 Commits

Author SHA1 Message Date
Doug Rabson
1522abdd5e Don't try to allocate memory resource unless address is non-zero. 1999-05-24 18:50:41 +00:00
Peter Wemm
578de0426e Fix a [start,end] vs [start,count] botch that corrupted the resource
manager and prevented IOPort allocation beyond the first EISA slot from
working.  subr_rman.c should have trapped this on the way into the system
rather than tripping over the wreckage.

Head banged into wall repeatedly by:  "Matthew N. Dodd" <winter@jurai.net>
1999-05-24 03:08:46 +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
Peter Wemm
a0ca55077a Don't reference non-existant ATAPI option..
PR:		11814
Submitted by:	Sheldon Hearn <sheldonh@uunet.co.za>
1999-05-23 11:11:31 +00:00
Bill Paul
33b3ee3898 - Fix up some comments in if_wi.c (no code changes)
- Mention that the 6Mbps turbo adapters are supported in HARDWARE.TXT
  and RELNOTES.TXT and the wi.4 man page
- Mention turbo adapters in the wicontrol.8 man page and provide a
  complete table of available transmit speed settings
1999-05-22 16:12:54 +00:00
Doug Rabson
f78030e22d Don't use BUS_WRITE_IVAR to manipulate resources. 1999-05-22 15:45:47 +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
Bruce Evans
bb86f61a79 Fixed style bugs in previous commit. 1999-05-22 08:36:55 +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
Andrey A. Chernov
80a290844b Set CHAR_{MIN,MAX} according to -funsigned-char flag given or not
PR: 11627
Submitted by: Petr Lampa <lampa@fee.vutbr.cz>
1999-05-20 23:33:35 +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
Hellmuth Michaelis
80037d6e9e upgrade isdn4bsd from version 0.71 to the just released version 0.81 1999-05-20 10:14:57 +00:00
Peter Wemm
ab25d374b2 Don't detect an EISA bus unless we see a "card" there somewhere. An EISA
motherboard will have a card for the "motherboard" on slot 0.
 eisa0: <EISA bus> on motherboard
 mainboard0: <ASU5101 (System Board)> at slot 0 on eisa0
This should stop the probe "detecting" an EISA bus everywhere that has
a 'controller eisa0' line regardless of whether it's really there.
1999-05-18 21:03:30 +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
Roger Hardiman
c558c5795a Added device major 125 for the Advantech PCI-1750 Digital IO card.
A very nice i/o board with 16 open collector outputs (capable of driving 5-40v)
and 16 inputs
Also has 2 16 bit cascadable counters (10Mhz clock) capable of
generating interrupts.

It is a PCI card, and emulates the Intel 8254 timer.
It uses the PLX PCI-9050 PCI bus interface to map the
8254 style hardware and the i/o registers into the IO space.

Developed by Jennifer Clark <jen@vulture.dmem.strath.ac.uk>
Strathclyde University Transparent Telepresence Research Group
1999-05-18 16:18:42 +00:00
Roger Hardiman
0f3563b68a Update text on using the smbus, iibus, iicbb controllers
with the bktr device.
1999-05-18 12:55:11 +00:00
Roger Hardiman
ec2a37ea3c Bt848 driver release 1.65
Updated with australian channel set

Submitted by:	Ivan Brawley <brawley@internode.com.au>
1999-05-18 12:14:39 +00:00
Alan Cox
88b67a96af pmap_qremove:
Eliminate unnecessary TLB shootdowns.
1999-05-18 06:01:49 +00:00
Justin T. Gibbs
493950f6d9 Correct the comment for the last commit.
Clean up the handling of failure modes in our attach so we don't free
resources twice.  ahc_free() will do all of the work for us (as would
be required by an unload event) so we only need to handle resources that
the softc has not taken ownership of.
1999-05-17 21:56:00 +00:00
Justin T. Gibbs
f240c08e4a Fix whitespace. Correct a comment. 1999-05-17 21:51:41 +00:00
David E. O'Brien
77492b54df Add `xe', the Xircom PC Card Ethernet driver. 1999-05-15 18:20:19 +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
Justin T. Gibbs
600829cdfc Nuke ucmpdi2.c from i386/libkern to serve as a reminder that switch
statements on 64bit values generate poor code.

Requested by: bde
1999-05-14 17:39:54 +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
Joseph Koshy
a6e1e3ab4b Correct comment to refer to kget(8). 1999-05-14 05:25:44 +00:00
Justin T. Gibbs
007c45c2e7 Add ucmpdi2.c to the i386 libkern build. 1999-05-14 05:10:15 +00:00
David E. O'Brien
282462f969 Add the `xe' Xircom PC Card driver. 1999-05-14 03:57:25 +00:00
Bruce Evans
c151de316a Fixed 10 out of 40 lines of -Wcast-qual warnings/errors. 3 lines were
for old confusion of `volatile char *' with `volatile caddr_t'.  7 lines
were for not being careful about aligning pointers to volatiles.
1999-05-13 12:21:41 +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
Peter Wemm
c7b52b866e Fix dev_t/minor problems 1999-05-12 19:01:30 +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
Bruce Evans
5264b48a6e Updated a comment (Crtat is no longer bogusly shared with syscons).
Don't declare a nonexistent variable.
1999-05-12 04:59:27 +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
Luoqi Chen
3c001d7648 Trap frame size has increased by 4.
Submitted by:		Kazutaka YOKOTA <yokota@freebsd.org>
1999-05-11 15:57:42 +00:00
Søren Schmidt
3458ae679d Make the driver work on HP8100 and the newer Philips that does not
support the rezero command.
1999-05-11 10:39:27 +00:00
John Birrell
8a13a92467 Change the INIT_PATH option example to use colons instead of semi-colons
(per rev 1.122 of sys/kern/init_main.c).
1999-05-11 10:10:39 +00:00
Bruce Evans
f86e40770a Fixed reset handling for motor off resets. I first fixed this together
with other reset handling in rev.1.83 but broke it in rev.1.120.  The
breakage didn't seem to cause any problems even on the system which had
problems ("extra" interrupts and botched handling thereof) before rev.1.83.
It only affects multi-floppy systems anyway.
1999-05-11 04:58:30 +00:00
Alan Cox
eb27b1567e The Intel Pentium Pro's performance counters are 40 bits wide. The Intel
manuals specifically say that reading the counters using the rdmsr
instruction returns a 64 bit value of which the higher 24 bits are
undefined. The code that reads the counters should then clear the
high 24 bits.

PR:		 i386/10632
1999-05-11 01:54:52 +00:00
Bruce Evans
58f28f6089 Fixed checking for maddr/msize conflicts. It was complete nonsense,
but was fairly harmless because not many devices have statically
configured msizes (none should have, but old-bus is missing post-probe
checks for maddr/msize conflicts, so sizes had to be statically
configured for maddr/msize conflict checking to actually work).

PR:		11146 (side issue)
1999-05-10 23:19:58 +00:00
Poul-Henning Kamp
ce7299939b correct params for sndmmap(). Don't bogo-initialize fields we don't
understand.
1999-05-10 18:13:30 +00:00
Doug Rabson
41787a353d Add missing suspend/resume methods. 1999-05-10 17:56:23 +00:00
Peter Wemm
7f2d5fc4f2 Move the mfs_getimage() prototype to mfs_extern.h duplicating it
everywhere.
1999-05-10 17:12:45 +00:00
Bruce Evans
149c3aa60a [Forgot to commit this in the batch a few days ago.]
Fixed profiling of elf kernels.  Made high resolution profiling compile
for elf kernels (it is broken for all kernels due to lack of egcs support).

Renaming of many assembler labels is avoided by declaring by declaring
the labels that need to be visible to gprof as having type "function"
and depending on the elf version of gprof being zealous about discarding
the others.  A few type declarations are still missing, mainly for SMP.

PR:		9413
Submitted by:	Assar Westerlund <assar@sics.se> (initial parts)
1999-05-10 10:51:25 +00:00
Peter Wemm
45d84a2db3 Clean out some unused leftovers from before the split from the old isa.c. 1999-05-09 23:56:00 +00:00
Peter Wemm
6ed87d5e8b Un-duplicate DO_SETBITS() (it was identical for both SMP and !SMP).. 1999-05-09 23:40:29 +00:00
Peter Wemm
3bab4ac5a1 For what it's worth, idelayed is declared as a volatile in the headers,
and even though it's not used in this file make it a volatile here too.
1999-05-09 23:32:29 +00:00
Peter Wemm
0264a0ebd1 loadandclear() uses an atomic instruction (even on SMP, where it's an
implicitly LOCK'ed instruction), so there shouldn't be any harm in making
it volatile pointer compatable for one of the users of it.  It seems to
generate the same code regardless.
1999-05-09 23:30:01 +00:00
Peter Wemm
87e37dccb6 #ifdef BRIDGE around a goto label used by the bridge code to silcence a
warning.
1999-05-09 23:24:47 +00:00
Peter Wemm
a127a70452 Move KERNEL?=kernel to top of the file where it's more obvious and add
a pointer to 'makeoptions' and /etc/make.conf.
Catch a few stray "kernel" hardcoded references.
Move the kernel.debug and related kernel build rules together.
1999-05-09 22:42:17 +00:00
Peter Wemm
2c8635c642 Put an example of 'makeoptions KERNEL=foo' to replace the old
'config foo' functionality.
1999-05-09 22:26:10 +00:00
Poul-Henning Kamp
5a44704319 don't confuse units and devices. 1999-05-09 20:29:04 +00:00
Nick Hibma
904b306815 Reserve 124 for USB Communications Class Drivers 1999-05-09 19:38:19 +00:00
Peter Wemm
18c3dd1745 s/main/mi_startup/ for the kernel entry point so that egcs doesn't get
upset about it (and generate things like __main() calls that are reserved
for main()).  Renaming was phk's suggestion, but I'd already thought about
it too.  (phk liked my suggested name tada() but I decided against it :-)

Reviewed by:	phk
1999-05-09 19:01:49 +00:00
Peter Wemm
37558b0171 Move a couple of bits of (now) static content from config(8) (ie: %LOAD)
directly into the Makefile.  Remove references to swapkernel.c, it's
not generated by config(8) now.  (The previous config commits had
generated it, but they had an unused 'char *' in them).
1999-05-09 18:57:02 +00:00
Peter Wemm
579f45fa60 Simplify the COMPAT_PCI_DRIVER/DATA_SET hack. We can add:
#define COMPAT_PCI_DRIVER(name,data) DATA_SET(pcidevice_set,data)
.. to 2.2.x and 3.x if people think it's worth it.  Driver writers can do
this if it's not defined.  (The reason for this is that I'm trying to
progressively eliminate use of linker_sets where it hurts modularity and
runtime load capability, and these DATA_SET's keep getting in the way.)
1999-05-09 17:07:30 +00:00
Poul-Henning Kamp
aa713cb898 Oops. If ROOTDEVNAME isn't defined, have -r call -a. 1999-05-09 16:56:09 +00:00
Poul-Henning Kamp
04ab695ebf no longer used. 1999-05-09 16:46:38 +00:00
Poul-Henning Kamp
b307e58fc7 Major lobotomy of config(8). The
config kernel mumble mumble

line has been obsoleted and removed and with it went all knowledge of
devices on the part of config.

You can still configure a root device (which is used if you give
the "-r" flag) but now with an option:

        options         ROOTDEVNAME=\"da0s2e\"

The string is parsed by the same code as at the "boot -a" prompt.

At the same time, make the "boot -a" prompt both more able and more
informative.

ALPHA/PC98 people:  You will have to adapt a few simple changes
(defining rootdev and dumpdev somewhere else) before config works
for you again, sorry, but it's all in the name of progress.
1999-05-09 16:46:01 +00:00
Peter Wemm
e37622b251 Fix a couple of warnings and some bitrot in comments. 1999-05-09 16:04:14 +00:00
Peter Wemm
47154c8706 Always use the module system, rather than in an #ifdef. 1999-05-09 15:57:52 +00:00
Peter Wemm
8baa9b47b6 Quiet a warning, put a #if 0 around some (I believe) unused static structs. 1999-05-09 13:21:06 +00:00
Peter Wemm
6f42b336a5 Move opt_sio.h options to conf/options and activate in isa/sio.c 1999-05-09 13:10:49 +00:00
Poul-Henning Kamp
52400704e9 Unconfuse DEV_MODULE() and DEV_DRIVER_MODULE() about the difference between
a major number for a dev_t.
1999-05-09 13:00:50 +00:00
Poul-Henning Kamp
3000820ae0 add some amount of sanity to the way the gdb stuff finds its device.
I'm not too happy about the result either, but at least it has less
chance of backfiring.

This particular feature could be called "a mess" without offending
anybody.
1999-05-09 10:51:13 +00:00
Poul-Henning Kamp
9cead0b272 Yet a major/dev_t confusion
Spotted by Bruce.
1999-05-09 10:42:39 +00:00
Poul-Henning Kamp
90fb336860 Yet another place which knew too much. Still not sure how much
good this does in the end.
1999-05-09 10:25:30 +00:00
Poul-Henning Kamp
0510491458 fix some DRIVER_TYPE / INTR_TYPE confusions. 1999-05-09 09:56:52 +00:00
Poul-Henning Kamp
33525517b5 Duh, bdevsw() takes dev_t arg. 1999-05-09 07:56:36 +00:00
Kazutaka YOKOTA
ab4918cbff Reserve a major number for the frame buffer device. 1999-05-09 05:02:15 +00:00
Kazutaka YOKOTA
4e1cc0095d Make apm_probe() properly return an error code when APM BIOS calls
failed, so that the apm driver won't be attached.
1999-05-09 04:58:13 +00:00
Doug Rabson
566643e39e Move the declaration of the interrupt type from the driver structure
to the BUS_SETUP_INTR call.
1999-05-08 21:59:43 +00:00
Peter Wemm
0bbd01ea13 Add some notes about the globalness of certain things like interrupts
and ISA DMA channels (ie: on most PCI systems, they are not.. they are
on the ISA side of the PCI-ISA bridge and could be duplicated if there
were multiple PCI-ISA bridges, say in a laptop docking station), while
the APIC resources would be global on SMP systems.
Also, revert a previous change, change some printfs back to panics.
1999-05-08 21:34:34 +00:00
Peter Wemm
14d3b6b80c GC some #if 0 junk 1999-05-08 21:28:39 +00:00
Peter Wemm
f98661016d Don't print 'interrupting at irq nn' on the x86 family, it's not all
that big a deal just yet and isn't worth a whole line on the boot screen.
This could change later in the face of multi-ISA-bus (eg: laptop docking
stations with two independent ISA busses) and SMP/APIC systems.  The Alpha
already has multiple interrupt destinations to deal with.
1999-05-08 20:24:44 +00:00
Peter Wemm
6d04a6cb97 I'm sick of the automatic rename of /kernel to /kernel.old while doing
development that leads to lots of crashes during boot.

I have made a 'reinstall' target (like in ports, and reinstall.debug)
This is most useful if you want to keep /kernel.old as a known bootable
kernel.  If you test a new kernel and have to reboot for a fix, a
'make reinstall' will install the new kernel over the top of the old
non-viable one, leaving the old one untouched.  This is mainly meant
for development, not general users.
1999-05-08 20:04:39 +00:00
Peter Wemm
ac0c5aaf01 Use haveseen_ioport() which is now connected up to the resource manager. 1999-05-08 18:20:57 +00:00
Peter Wemm
479232a2e7 GC some unused stuff relating to the old conflict checking and other lint.
Change haveseen_isadev() to something a little easier to emulate.
Store the device_t for the wrapper in isa_device.
Implement a replacement for haveseen_isadev - namely haveseen_ioport()
which takes a port size as an extra argument for a proper range check.
This (haveseen_ioport()) has not been tested, but I think it'll work.
1999-05-08 18:20:05 +00:00
Peter Wemm
1a738e4be7 Look up the sensitive flag better, allowing interoperation between old and
new isa drivers with sensitive flags.  If the resource_find() code
is meant to "find" the wildcard sensitive flag for a driver even though
a unit is supplied, this can be simplified.
1999-05-08 18:15:49 +00:00
Peter Wemm
df5c783c68 Fix unused variable "flags". (only used if #ifdef I586_CPU) 1999-05-08 18:14:09 +00:00
Peter Wemm
4fdff1649a GC unused #define id_physid id_scsiid 1999-05-08 18:13:15 +00:00
Peter Wemm
8292f0f488 Update for new resource_set_*() interface. Also deal with the conflicts
flag.
1999-05-08 18:12:03 +00:00
Peter Wemm
aee579830d Add brackets around && within || to quieten egcs. I've checked the code
and I'm reasonably sure it's right, but I don't have one of the beasties.
1999-05-08 17:52:03 +00:00
Peter Wemm
9c06a38614 Make sure the mem_range_AP_init() prototype is seen where it's needed, and
#ifdef SMP around it for fun.
1999-05-08 17:48:22 +00:00
Peter Wemm
b5a1d3ab96 Take a guess at a halfway reasonable fla entry so that the build
doesn't break on isa_compat.[ch].  phk - change this to what you need..
1999-05-08 15:46:46 +00:00
Poul-Henning Kamp
c1023c75e9 Add compat hooks for DiskOnChip2000 driver.
Minor change to loran driver
1999-05-08 14:36:48 +00:00
Poul-Henning Kamp
1637aa4b1c Fix some of the places where too much inside knowledge about major/minor
layout and dev_t structure is being (ab)used.
1999-05-08 07:02:41 +00:00
Poul-Henning Kamp
4be2eb8c49 I got tired of seeing all the cdevsw[major(foo)] all over the place.
Made a new (inline) function devsw(dev_t dev) and substituted it.

Changed to the BDEV variant to this format as well: bdevsw(dev_t dev)

DEVFS will eventually benefit from this change too.
1999-05-08 06:40:31 +00:00
Peter Wemm
0b45dbca38 Yet another kludge to maintain the isa_device illusion, this time malloc
an isa_driver and name pointer so the uc_devlist sysctl can get to it.
1999-05-07 16:54:50 +00:00
Poul-Henning Kamp
46eede0058 Continue where Julian left off in July 1998:
Virtualize bdevsw[] from cdevsw.  bdevsw() is now an (inline)
        function.

        Join CDEV_MODULE and BDEV_MODULE to DEV_MODULE (please pay attention
        to the order of the cmaj/bmaj arguments!)

        Join CDEV_DRIVER_MODULE and BDEV_DRIVER_MODULE to DEV_DRIVER_MODULE
        (ditto!)

(Next step will be to convert all bdev dev_t's to cdev dev_t's
before they get to do any damage^H^H^H^H^H^Hwork in the kernel.)
1999-05-07 10:11:40 +00:00
Poul-Henning Kamp
c48d17750f Introduce two functions: physread() and physwrite() and use these directly
in *devsw[] rather than the 46 local copies of the same functions.

(grog will do the same for vinum when he has time)
1999-05-07 07:03:47 +00:00
Kirk McKusick
e244fe31d6 Generalize to allow any serial port to be used as the GDB port.
Mark the GDB port in the config file with flags 0x80. Currently
only the sio driver checks these flags and sets up a GDB port,
but adding similar code to other serial drivers would be easy.
For backward compatibility, if an sio port is marked as the console
and no port is marked as the gdb port, the GDB port will be mapped
to the console port. This hack should go away at some point.
1999-05-07 06:50:41 +00:00
Bill Paul
049e649a10 Add support to wicontrol(8) and wi(4) for enabling and configuring
power management. This will only work on newer firmware revisions; older
firmware will silently ignore the attempts to turn power management on.

Patches supplied by: Brad Karp <karp@eecs.harvard.edu>
1999-05-07 03:28:54 +00:00
Peter Wemm
691343c4f8 Use id_ointr for setting the pnp interrupt handler, it uses the oldstyle
int unit argument still.
1999-05-06 22:26:28 +00:00
Peter Wemm
5e80440b17 Use consistant function definitions which also silences a warning. 1999-05-06 22:17:26 +00:00
Peter Wemm
94f9940a0c Ensure prototype for pnp_configure() is visible. 1999-05-06 22:16:19 +00:00
Peter Wemm
ea5c2064b4 GC unused variable 1999-05-06 22:14:46 +00:00
Peter Wemm
ea861c7968 Pull in prototype for splq(). 1999-05-06 22:13:53 +00:00
Peter Wemm
284c724fb4 Fix a static/extern conflict. Put extra brackets to ensure the
tsleep() priority is clear and not parsed incorrectly.
1999-05-06 22:13:04 +00:00
Peter Wemm
ae89b422d5 Put the old-style isa interrupt handlers in id_ointr to avoid warnings. 1999-05-06 22:11:19 +00:00
Peter Wemm
189f4bb9c8 Fix a warning - make sure the register is read regardless of the debugging
options.
1999-05-06 22:09:55 +00:00
Kenneth D. Merry
9deea8574e Add a number of interrelated CAM feature enhancements and bug fixes.
NOTE:  These changes will require recompilation of any userland
applications, like cdrecord, xmcd, etc., that use the CAM passthrough
interface.  A make world is recommended.

camcontrol.[c8]:
 - We now support two new commands, "tags" and "negotiate".

	- The tags commands allows users to view the number of tagged
	  openings for a device as well as a number of other related
	  parameters, and it allows users to set tagged openings for
	  a device.

	- The negotiate command allows users to enable and disable
	  disconnection and tagged queueing, set sync rates, offsets
	  and bus width.  Note that not all of those features are
	  available for all controllers.  Only the adv, ahc, and ncr
	  drivers fully support all of the features at this point.
	  Some cards do not allow the setting of sync rates, offsets and
	  the like, and some of the drivers don't have any facilities to
	  do so.  Some drivers, like the adw driver, only support enabling
	  or disabling sync negotiation, but do not support setting sync
	  rates.

 - new description in the camcontrol man page of how to format a disk
 - cleanup of the camcontrol inquiry command
 - add support in the 'devlist' command for skipping unconfigured devices if
   -v was not specified on the command line.
 - make use of the new base_transfer_speed in the path inquiry CCB.
 - fix CCB bzero cases

cam_xpt.c, cam_sim.[ch], cam_ccb.h:

 - new flags on many CCB function codes to designate whether they're
   non-immediate, use a user-supplied CCB, and can only be passed from
   userland programs via the xpt device.  Use these flags in the transport
   layer and pass driver to categorize CCBs.

 - new flag in the transport layer device matching code for device nodes
   that indicates whether a device is unconfigured

 - bump the CAM version from 0x10 to 0x11

 - Change the CAM ioctls to use the version as their group code, so we can
   force users to recompile code even when the CCB size doesn't change.

 - add + fill in a new value in the path inquiry CCB, base_transfer_speed.
   Remove a corresponding field from the cam_sim structure, and add code to
   every SIM to set this field to the proper value.

 - Fix the set transfer settings code in the transport layer.

scsi_cd.c:

 - make some variables volatile instead of just casting them in various
   places
 - fix a race condition in the changer code
 - attach unless we get a "logical unit not supported" error.  This should
   fix all of the cases where people have devices that return weird errors
   when they don't have media in the drive.

scsi_da.c:

 - attach unless we get a "logical unit not supported" error

scsi_pass.c:

 - for immediate CCBs, just malloc a CCB to send the user request in.  This
   gets rid of the 'held' count problem in camcontrol tags.

scsi_pass.h:

 - change the CAM ioctls to use the CAM version as their group code.

adv driver:

 - Allow changing the sync rate and offset separately.

adw driver

 - Allow changing the sync rate and offset separately.

aha driver:

 - Don't return CAM_REQ_CMP for SET_TRAN_SETTINGS CCBs.

ahc driver:

 - Allow setting offset and sync rate separately

bt driver:

 - Don't return CAM_REQ_CMP for SET_TRAN_SETTINGS CCBs.

NCR driver:

 - Fix the ultra/ultra 2 negotiation bug
 - allow setting both the sync rate and offset separately

Other HBA drivers:
 - Put code in to set the base_transfer_speed field for
   XPT_GET_TRAN_SETTINGS CCBs.

Reviewed by:	gibbs, mjacob (isp), imp (aha)
1999-05-06 20:16:39 +00:00
Poul-Henning Kamp
b0eeea2042 remove b_proc from struct buf, it's (now) unused.
Reviewed by:	dillon, bde
1999-05-06 20:00:34 +00:00
Peter Wemm
3f251a4979 Fix 'signed char as array index' warnings and an unused variable. 1999-05-06 18:58:05 +00:00
Peter Wemm
c41dbe5cc4 Missing 'int' in declaration of variables. 1999-05-06 18:54:19 +00:00
Peter Wemm
03a4d0108f Fix a precedence bug in the atapi tape driver. I think it could either
write a filemark where it wasn't needed, or neglect to write one at all,
depending on how the boolean converted to an int value for the &.
1999-05-06 18:50:10 +00:00
Peter Wemm
d5558c001a Fix up a few easy 'assignment used as truth value' and 'suggest parens
around && within ||' type warnings.  I'm pretty sure I have not masked
any problems here, I've committed real problem fixes seperately.
1999-05-06 18:44:42 +00:00
Peter Wemm
522c197d02 The joypart() macro had a precedence bug. Add seatbelts for UNIT() too. 1999-05-06 18:39:32 +00:00
Peter Wemm
dfd5dee1b0 Add sufficient braces to keep egcs happy about potentially ambiguous
if/else nesting.
1999-05-06 18:13:11 +00:00
Peter Wemm
5f0d05904c Add missing comment characters from wi driver description. 1999-05-06 18:08:23 +00:00
Bill Paul
e566363ef1 Modify wicontrol(8) and wi(4) to allow setting the frequency of the
WaveLAN's radio modem. The default is whatever the NIC uses since NICs
sold in different countries may default to different frequencies. (The
Lose95/LoseNT software doesn't let you select the channel so it's probably
not really meant to be changed.)
1999-05-06 16:32:45 +00:00
Nick Hibma
4ca710c5e2 Added USB HID devices major number.
Submitted by: MAEKAWA Masahide
1999-05-06 13:51:26 +00:00
Peter Wemm
97bf178703 I'm not sure why the #ifdef SMP became #if 1 (this overrode the npx probe
and always succeeded as is required on SMP).  Anyway, reverting this
still compiles and appears ok.
1999-05-06 12:47:21 +00:00
Bruce Evans
ea2b3e3d1b Fixed profiling of elf kernels. Made high resolution profiling compile
for elf kernels (it is broken for all kernels due to lack of egcs support).

Renaming of many assembler labels is avoided by declaring by declaring
the labels that need to be visible to gprof as having type "function"
and depending on the elf version of gprof being zealous about discarding
the others.  A few type declarations are still missing, mainly for SMP.

PR:		9413
Submitted by:	Assar Westerlund <assar@sics.se> (initial parts)
1999-05-06 09:44:57 +00:00
Bill Paul
c49713fde1 Fix some byte ordering problems; I was storing string lengths wrong,
which was causing wicontrol to crash when reading string parameters
from the WaveLAN.

Patches submitted by: Brad Karp <karp@eecs.harvard.edu>
1999-05-06 03:34:02 +00:00
Luoqi Chen
25b602e4c2 Now that each cpu has its own gdt table, we need to setup apm gdt entries in
all the tables.
1999-05-06 01:07:03 +00:00
Luoqi Chen
c300b7b6c1 Initialize dblfault_tss.tss_fs to the per-cpu private data segment selector. 1999-05-06 00:54:54 +00:00
Luoqi Chen
68db6cea99 Do not set curproc until proc0 is fully initialized (in proc0_init()). 1999-05-06 00:39:00 +00:00
John Birrell
785d2100dd Add the INIT_PATH option for embedded systems. 1999-05-05 12:22:31 +00:00
Jordan K. Hubbard
3d0d924077 Add information strings for a number of devices which have suddenly appeared
in the configuration name space.
1999-05-05 09:37:22 +00:00
Bill Paul
31a08ab08e Add device driver support for the Lucent WaveLAN/IEEE 802.11 PCMCIA
adapter (and some workalikes). Also add man pages and a wicontrol
utility to manipulate some of the card parameters.

This driver was written using information gleaned from the Lucent HCF Light
library, though it does not use any of the HCF Light code itself, mainly
because it's contaminated by the GPL (but also because it's pretty gross).
The HCF Light lacks certain featurs from the full (but proprietary) HCF
library, including 802.11 frame encapsulation support, however it has
just enough register information about the Hermes chip to allow someone
with enough spare time and energy to implement a proper driver. (I would
have prefered getting my hands on the Hermes manual, but that's proprietary
too. For those who are wondering, the Linux driver uses the proprietary
HCF library, but it's provided in object code form only.)

Note that I do not have access to a WavePOINT access point, so I have
only been able to test ad-hoc mode. The wicontrol utility can turn on
BSS mode, but I don't know for certain that the NIC will associate with
an access point correctly. Testers are encouraged to send their results
to me so that I can find out if I screwed up or not.
1999-05-05 07:37:11 +00:00
Bill Paul
113a394c06 Add device driver support for the Lucent WaveLAN/IEEE 802.11 wireless
network adapters. These are all PCMCIA devices (the ISA version is a
PCMCIA to ISA bridge with a PCMCIA card plugged into it). Also add a
wicontrol utility to read and write some of the card's parameters.

Note: I do not have access to a WavePOINT access point, so I have only
been able to test this driver in ad-hoc (point to point) mode. The
wicontrol utility allows programming the desired service set name (SSID)
and enabling BSS mode, but I can't tell for sure if it works (I know the
card switches modes, but I can't verify that it joins a service set
correctly).

This driver was written using information gleaned from the Lucent HCF Light
library, which is an API library designed to simplify driver development
for devices based on the Lucent Hermes chip. Unfortunately, the HCF Light
is missing certain features (like 802.11 frame encapsulation!) which are
available only in the proprietary complete HCF code, which is not available
to the public. This driver uses none of the HCF Light code: it's very ugly
and contaminated by the GPL. IP and ARP packets are encapsulated as 802.11
frames, everything else is encapsulated as 802.3.

(It would be easier to just get the Hermes programming manual, but that's
not publically available either. For those who are wondering, the Linux
WaveLAN/IEEE driver uses the proprietary HCF code, which is provided in
object code form only. So much for supporting open source sofware.)

Multicast filter support is implemented, however it appears that the
filter doesn't work: programming in one IP mutlicast group enables them
all.
1999-05-05 07:11:38 +00:00
Doug Rabson
6887e80a0f Use unit, not device_id as an argument to an old-style ISA interrupt
handler. This fixes pnp interrupts and would have fixed pccard interrupts
but a workaround has been applied there.

This the sound driver problems which people have reported with new-bus.
1999-05-04 21:18:20 +00:00
KATO Takenori
8d0e6b1696 Replace misused FE_D6_BBW with FE_D6_SBW.
Submitted by:	chi@bd.mbn.or.jp (Chiharu Shibata)
Reminded by:	Takahashi Yoshihiro <nyan@dd.catv.ne.jp>
1999-05-04 12:59:59 +00:00
Poul-Henning Kamp
f16bbd9770 Grab a char-major for dallas semiconductor one-wire bus. 1999-05-04 10:48:22 +00:00
Mike Smith
3574d12d70 Disable the ppc chipset-specific probes by default. 1999-05-04 00:15:15 +00:00
Bill Fumerola
3d177f465a Add sysctl descriptions to many SYSCTL_XXXs
PR:		kern/11197
Submitted by:	Adrian Chadd <adrian@FreeBSD.org>
Reviewed by:	billf(spelling/style/minor nits)
Looked at by:	bde(style)
1999-05-03 23:57:32 +00:00
Peter Wemm
cbdfdcb2f4 Don't deref a NULL mem_range_softc.mr_op pointer on non-MTRR systems when
starting the AP.
1999-05-03 09:47:53 +00:00
Peter Wemm
87f0e52bec Set ifq_maxlen to default value. (This should be safe, it's not clear
if there's benefit to setting it to the exact amount, it appears the
card has 32K of ram, and 8K is used for outgoing packets, that would
be something like a queue limit of 5 packets.  I don't think that's
useful...)

PR:		11456
Submitted by:	Stephen J. Roznowski <sjr@home.net>
1999-05-02 22:01:24 +00:00
Nick Hibma
b7b075a2a2 Add driver for the Iomega Zip 100 drive. 1999-05-02 21:54:05 +00:00
Peter Wemm
0441b961d8 Sigh, serves me right for committing without reading the followups. :-]
The whole thing (mpu_config etc) is dead code.

PR:		11411 (followup)
Pointed out by:	"Daniel C. Sobral" <dcs@newsguy.com>
1999-05-02 21:53:28 +00:00
Nick Hibma
97f17d41f7 Change e-mail address 1999-05-02 21:52:15 +00:00
Peter Wemm
f79cfdd928 Operator precedence bug
PR:		11411
Submitted by:	Christopher Peterson <cpeterso@cs.washington.edu>
1999-05-02 21:51:17 +00:00
Peter Wemm
271694cc1e Operator precedence bug
PR:		11415
Submitted by:	Christopher Peterson <cpeterso@cs.washington.edu>
1999-05-02 21:46:31 +00:00
Peter Wemm
ccb64c7419 Typo: if (mpu_config = NULL) -> if (mpu_config != NULL)
PR:		11411
Submitted by:	Christopher Peterson <cpeterso@cs.washington.edu>
1999-05-02 21:43:20 +00:00
Peter Wemm
025fd878ff Operator precedence bug
PR:		11410
Submitted by:	Christopher Peterson <cpeterso@cs.washington.edu>
1999-05-02 21:41:20 +00:00
Peter Wemm
cf52c04ff2 Attempt to make the sound driver recompile, at least for LINT which has
the sscape/trix driver active, which (for some reason) disables the
mpu401 driver, causing an undefined reference to mpuintr.  This was broken
with rev 1.79 (part of the PC98 nss driver commit).
1999-05-02 20:40:28 +00:00
Peter Wemm
edfdec1910 Disable FDC_YE - it's broken at present (breaking LINT) and awaiting some
pccard fixups.
Make DEVFS compile, it breaks LINT.
1999-05-02 20:38:08 +00:00
Peter Wemm
741640aac6 These two drivers have not been converted for newbus eisa yet. 1999-05-02 20:35:44 +00:00
Peter Wemm
db7cb131d0 Disable second declaration of oltr0 - the first one (intended for isa) will
cause the device to be found on all busses, including pci.
1999-05-02 20:34:06 +00:00
Mike Smith
1bbb92c757 Whoops, not all SMP systems have memory range attribute support. Don't
try to set it up on an AP unless we do.

Submitted by:	dave adkins <adkin003@tc.umn.edu>
1999-05-02 03:06:22 +00:00
Mike Smith
4a034f21cd Add a hook that can be called to initialise a slave processor's memory
range attributes after they have been extracted from the master.

Hook up the i686 MP code to do this for each AP.

Be more careful about printing the default memory type for the i686.

Suggestions from: luoqi
1999-04-30 22:09:45 +00:00
Luoqi Chen
9debe21353 - Handle mixer read ioctls correctly. They have the same group, number and
argument size as their write counterparts and were handled as write ioctls.
- Emulate some cdrom ioctls.
1999-04-29 04:37:57 +00:00
Dmitrij Tejblum
604359cf9b s/static foo_devsw_installed = 0;/static int foo_devsw_installed;/.
(Edited automatically)
1999-04-28 10:54:24 +00:00
Luoqi Chen
5206bca10a Enable vmspace sharing on SMP. Major changes are,
- %fs register is added to trapframe and saved/restored upon kernel entry/exit.
- Per-cpu pages are no longer mapped at the same virtual address.
- Each cpu now has a separate gdt selector table. A new segment selector
  is added to point to per-cpu pages, per-cpu global variables are now
  accessed through this new selector (%fs). The selectors in gdt table are
  rearranged for cache line optimization.
- fask_vfork is now on as default for both UP and SMP.
- Some aio code cleanup.

Reviewed by:	Alan Cox	<alc@cs.rice.edu>
		John Dyson	<dyson@iquest.net>
		Julian Elischer	<julian@whistel.com>
		Bruce Evans	<bde@zeta.org.au>
		David Greenman	<dg@root.com>
1999-04-28 01:04:33 +00:00
Poul-Henning Kamp
1c308b817a Change suser_xxx() to suser() where it applies. 1999-04-27 12:21:16 +00:00
Poul-Henning Kamp
f711d546d2 Suser() simplification:
1:
  s/suser/suser_xxx/

2:
  Add new function: suser(struct proc *), prototyped in <sys/proc.h>.

3:
  s/suser_xxx(\([a-zA-Z0-9_]*\)->p_ucred, \&\1->p_acflag)/suser(\1)/

The remaining suser_xxx() calls will be scrutinized and dealt with
later.

There may be some unneeded #include <sys/cred.h>, but they are left
as an exercise for Bruce.

More changes to the suser() API will come along with the "jail" code.
1999-04-27 11:18:52 +00:00
Peter Wemm
3bfdd012d8 Only call kvtop on non-null id_maddr's... 1999-04-26 12:49:39 +00:00
Peter Wemm
10cd8cf48b Register the netisr's via SYSINIT rather than linker sets. 1999-04-26 08:57:51 +00:00
Alan Cox
51bb7ba664 pmap_dispose_proc and pmap_copy_page:
Conditionally compile 386-specific code.

pmap_enter:
	Eliminate unnecessary TLB shootdowns.

pmap_zero_page and pmap_zero_page_area:
	Use invltlb_1pg instead of duplicating the code.
1999-04-25 18:40:05 +00:00
Poul-Henning Kamp
0bb2226a4d Make the machdep.i8254_freq and machdep.tsc_freq sysctls modify the
timecounter as well

Asked for by:	bde, jhay
1999-04-25 09:00:00 +00:00
Peter Wemm
19477ba0b7 The fd options changed during new-bus. 1999-04-24 21:46:56 +00:00
Peter Wemm
5895e3c8ee De-quote where possible and minor tweaks. depends on a current config(8). 1999-04-24 21:45:44 +00:00
Peter Wemm
061eb3abb3 Bump configvers; when the updates to generic/lint get committed, the old
config has severe indigestion.
1999-04-24 21:38:50 +00:00
Bill Fumerola
98e32b1820 Add $Id: $ 1999-04-24 20:26:12 +00:00
Peter Wemm
57a6bf02a3 #if 0 out the pci device list, not that you could do a lot with it. It
was only looking at old style drivers in the pcidevice_set, which doesn't
exist any more..  Ultimately, the pci and eisa bus drivers will check for
hints for wiring, flags and enable/disable etc as well.
1999-04-24 20:20:37 +00:00
Peter Wemm
96b3554e5c Use COMPAT_PCI_DRIVER() for registration if it exists. This shouldn't
hurt the driver portability to 3.x too much for where drivers are shared.
1999-04-24 20:17:05 +00:00
KATO Takenori
424af31b45 Changed the type of id_port from short into int to avoid wrong
conversion from short to unsigned long which is an argument of
bus_alloc_resource.  Since the value -1 is used to indicate no port
reousece, id_port need to be signed (suggested by Doug Rabson and
Peter Wemm.)
1999-04-24 18:24:43 +00:00
Peter Wemm
ea7b76b16b Drop tty/net/bio/cam interrupt class labels, it's meaningless here now. 1999-04-24 16:07:51 +00:00
Peter Wemm
36d9945d74 Drop the tty/net/bio/cam interrupt class labels, they are meaninless here
now.
1999-04-24 16:04:16 +00:00
Peter Wemm
7e381ee0b4 Back out parts of rev 1.4; making isa.c preserve the hints across a
release made it unneeded.
1999-04-24 07:04:51 +00:00
Peter Wemm
8e51a153aa Revert part of 1.9; we don't need to reset the port after release now that
the isa bus doesn't clear the hints at that point.
1999-04-24 06:48:27 +00:00
Peter Wemm
d70a04d62d Don't clear the hints on release, just the resource containers. 1999-04-24 06:47:24 +00:00
Peter Wemm
0483b5b696 Typo, use SYS_RES_IRQ when releasing the irq resource, not SYS_RES_IOPORT. 1999-04-24 06:46:10 +00:00
KATO Takenori
2b2c7e7c09 - PC98 doesn't support 16bits bus I/F of adv deriver.
- PC98 has the bs driver.

Submitted by:	Takahashi Yoshihiro <nyan@dd.catv.ne.jp>
1999-04-24 04:21:42 +00:00
KATO Takenori
6e982e922a 1MB is not 1024 * 1024 * 1024 but 1024 * 1024. 1999-04-24 04:16:22 +00:00
Justin T. Gibbs
74ed7047aa staticize. 1999-04-23 23:29:23 +00:00
Justin T. Gibbs
6d6f090033 ahb.c:
Synchronize malloc types for our softc.

ahc_eisa.c:
	Sync to aic7xxx driver bus dma and new bus changes.
1999-04-23 23:29:00 +00:00
Peter Wemm
525a3d26e7 Make the register_intr() glue actually have a chance of working... 1999-04-23 21:01:19 +00:00
Dmitrij Tejblum
11a9f83f80 Make pmap_collect() an official pmap interface. 1999-04-23 20:29:58 +00:00
Dmitrij Tejblum
0666dbe1cf Moved cpu_set_fork_handler's prototype from <machine/cpu.h> to <sys/proc.h>.
Suggested by:	bde
1999-04-23 20:22:44 +00:00
Peter Wemm
6757ed7e26 Update VM86 comment - it's used for VESA too.
PR:		7976
Submitted by:	Stefan Eggers <seggers@semyam.dinoco.de>
1999-04-23 06:30:10 +00:00
John Polstra
607c815bef Update #include statements to reflect the new location of "sioreg.h".
With these changes plus the egcs fix I committed a few minutes ago,
"make -DWANT_AOUT world" works again.  Most likely, "make upgrade"
is fixed too, though I haven't tested that.
1999-04-22 21:02:44 +00:00
Peter Wemm
9d0e5f96b0 Return the port size from the probe.
"ppc0 at port 0x378 irq 7 drq 3 on isa0" becomes
"ppc0 at port 0x378-0x37f irq 7 drq 3 on isa0"
1999-04-22 13:10:43 +00:00
Warner Losh
bb31204c9b DEVICE_SUSPEND was always returning ENXIO for reasons unknown. For
now we noisily ignore this (and all errors).  DEVICE_SUSPEND should be
corrected, but I wanted to unbreak suspend until that happens.
1999-04-21 07:57:55 +00:00
Peter Wemm
8528f91719 oops, SMP was missing includes for a typedef. 1999-04-21 07:41:40 +00:00
Peter Wemm
54a8c69347 Stage 1 of a cleanup of the i386 interrupt registration mechanism.
Interrupts under the new scheme are managed by the i386 nexus with the
awareness of the resource manager.  There is further room for optimizing
the interfaces still.  All the users of register_intr()/intr_create()
should be gone, with the exception of pcic and i386/isa/clock.c.
1999-04-21 07:26:30 +00:00
Doug Rabson
c2974efdbe Make bt driver work on eisa again.
Submitted by: Matthew N. Dodd <winter@jurai.net>
1999-04-20 09:53:05 +00:00
Hellmuth Michaelis
00f8b3fd87 Make pcvt compile and run again after find_display() is gone as part of
the new-bus changes. Also fix several compiler warnings.
1999-04-20 08:45:27 +00:00
Peter Wemm
7ceeede80c Always reset the isa hints after releasing the resources after probe,
because the act of doing the release kills the hints(!).  A quirk of
the wrapper caused it to reset all the settings, except perhaps for the
memory address. I've tested this with a real SMC 8013EPC - which uses
shared memory addresses - it seems to work OK.
1999-04-19 20:31:53 +00:00
Peter Wemm
63cfedcc93 The missing prototype for isa_wrap_old_drivers() was bugging me.. 1999-04-19 20:16:22 +00:00
Peter Wemm
0f6dea5ce2 Make userconfig saving actually work.. 1999-04-19 19:40:58 +00:00
Alan Cox
270da41581 _pmap_unwire_pte_hold and pmap_remove_page:
Use pmap_TLB_invalidate instead of invltlb_1pg to eliminate
	unnecessary IPIs.

pmap_remove, pmap_protect and pmap_remove_pages:
	Use pmap_TLB_invalidate_all instead of invltlb to eliminate
	unnecessary IPIs.

pmap_copy:
	Use cpu_invltlb instead of invltlb when updating APTDpde.

pmap_changebit:
	Rather than deleting the unused "set bit" option (which may be
	useful later), make pmap_changebit an inline that is used
	by the new pmap_clearbit procedure.

Collectively, the first three changes reduce the number of TLB shootdown
IPIs by 1/3 for a kernel compile.
1999-04-19 18:45:21 +00:00
Luoqi Chen
8e9aec89b1 Fix a potential hang situation.
PR:		i386/2108
1999-04-19 18:44:16 +00:00
Peter Wemm
ee35d927c2 Don't do (1 << irq) to get an interrupt mask when irq = -1.
Submitted by:	Luoqi Chen <luoqi@watermarkgroup.com>
1999-04-19 18:03:51 +00:00
Peter Wemm
d95939af7a Zap LKM option and support. Farewell old friend. 1999-04-19 14:19:52 +00:00
Peter Wemm
db42d90829 unifdef -DVM_STACK - it's been on for a while for x86 and was checked
and appeared to be working for the Alpha some time ago.
1999-04-19 14:14:14 +00:00
Peter Wemm
5f5a2519b4 Fix a braino from last commit. 1999-04-19 14:01:42 +00:00
Peter Wemm
896de22812 GC some now unused (and #if 0) code. 1999-04-19 13:34:25 +00:00
Peter Wemm
f71c851c25 Drop the 'at nexus?' from the busses, it's not used.
Reactivate eisa0 and pnp0 in GENERIC, they work..  (eisa has been converted
but pnp still (for the most part) works the old way).
1999-04-19 11:53:36 +00:00
Brian Somers
23f7bd1706 Spelling police 1999-04-19 10:18:34 +00:00
Doug Rabson
343f195b0c Fix some confusion between physical and virtual addresses when recording
the driver's choice of memory window.
1999-04-19 08:42:39 +00:00
Peter Wemm
3c0d8bc982 Always create attach points for the various child busses that can be
attached to the nexus.  With one exception, this (for example) allows
you to do wierd things like kldload the eisa bus on the fly and then
drivers, and have it auto probe the eisa bus when the drivers come online.

The one exception being pci, it only adds the pcib after the presence of
the pci bus is detected and that's #if'ed code.

A side effect of this is that isa and eisa will be attached to the nexus
directly rather than the PCI->ISA or PCI->EISA bridges.  I'm not sure if
this is good or bad at this point, but it seems to be closer to the way
things are for the i386 family...  This is likely to be followed up.

This also fixes compilation without a PCI bus configured and will allow
eisa to work without PCI too.
1999-04-19 08:04:19 +00:00
Peter Wemm
e51d99dc81 EISA can (or will) be a child of the i386 nexus on non-PCI systems. 1999-04-19 07:58:34 +00:00
Peter Wemm
bed56f7f4d Set the bus description for EISA, like it is for ISA. 1999-04-19 06:57:33 +00:00
Warner Losh
da2d2676bb Set ifq_maxlen to eliminate "zp0 XXX: driver didn't set ifq_maxlen"
message on boot.

I know this driver is depricated, but I need to use it for a little
while.
1999-04-19 06:56:24 +00:00
Peter Wemm
bdd11a743e Compile without a PCI bus in the kernel. 1999-04-18 20:15:06 +00:00
Peter Wemm
0f6bc47029 Make the bt isa driver work..
- fix cut/paste problem. :-)
- don't forget to call isa_dmacascade()
- reset the port after we release resources.

That last one is a trap to watch out for..  The isa bus driver uses the
same port/irq/mem/etc variables for the initial probe hints as it does
for allocation/deallocation tracking.  Releasing a resource clears the
variable and then you loose the hint during attach.. (ouch!)
1999-04-18 19:08:28 +00:00
Peter Wemm
a49a3d4433 Implement an EISA new-bus framework. The old driver probe mechanism
had a quirk that made a shim rather hard to implement properly and it was
just easier to convert the drivers in one go.  The changes to the
buslogic driver go beyond just this - the whole driver was new-bus'ed
including pci and isa.  I have only tested the EISA part of this so far.

Submitted by:	 Doug Rabson <dfr@nlsystems.com>
1999-04-18 15:50:35 +00:00
Peter Wemm
a7375c7225 Remove i386-specific psm.c - it's now in sys/isa/psm.c 1999-04-18 15:13:03 +00:00
Doug Rabson
d6c789c07a Add support for 'disabled' probe hint. 1999-04-18 15:10:58 +00:00
Peter Wemm
c6f819b927 These two have been replaced with isa/sio* in the generic isa area. 1999-04-18 14:38:42 +00:00
KATO Takenori
924b60cb56 Added PC98 code.
Submitted by:	Takahashi Yoshihiro <nyan@wyvern.cc.kogakuin.ac.jp>
1999-04-18 14:30:55 +00:00
Paul Richards
3a129cf3d9 Set ifq_maxlen to IFQ_MAXLEN 1999-04-18 01:49:16 +00:00
Paul Richards
0fde788552 Set ifq_maxlen to number of transmit descriptors. 1999-04-18 01:37:19 +00:00
Paul Richards
195f63e808 The changes to vm_page.c have broken the assumption that mallocing
early will result in memory below 16M so now we need to explicitly use
contigmalloc to get low physical memory.
1999-04-18 01:03:46 +00:00
Peter Wemm
ebebab7e3c Wrap the pcm driver for old isa probes.
Correct #ifdef typo for sbxvi (Thanks Brian!)
1999-04-17 19:38:38 +00:00
Bruce Evans
2d0e5840b4 Allocate space for struct isa_device's, not for pointers thereto.
This fixes memory corruption that caused calls to address 0 here.
1999-04-17 09:56:35 +00:00
Peter Wemm
e3cc309336 We use the generic isa version now. 1999-04-17 00:02:56 +00:00
Peter Wemm
6e779b5997 We now use the generic isa version.. 1999-04-17 00:01:59 +00:00
Peter Wemm
7756e4b58e vga_isa.c is now generic, not i386 specific (src/sys/isa/vga_isa.c) 1999-04-17 00:00:31 +00:00
Peter Wemm
c2c75d780e As a temporary anti-foot-shooting measure, don't let the user attach
the atkbd device to isa, as was in the old (and 3.x) GENERIC config.
1999-04-16 23:39:15 +00:00
Peter Wemm
6182fdbda8 Bring the 'new-bus' to the i386. This extensively changes the way the
i386 platform boots, it is no longer ISA-centric, and is fully dynamic.
Most old drivers compile and run without modification via 'compatability
shims' to enable a smoother transition.  eisa, isapnp and pccard* are
not yet using the new resource manager.  Once fully converted, all drivers
will be loadable, including PCI and ISA.

(Some other changes appear to have snuck in, including a port of Soren's
 ATA driver to the Alpha.  Soren, back this out if you need to.)

This is a checkpoint of work-in-progress, but is quite functional.

The bulk of the work was done over the last few years by Doug Rabson and
Garrett Wollman.

Approved by:	core
1999-04-16 21:22:55 +00:00
Jordan K. Hubbard
24c38be4da Add SYSVSEM so that newer versions of Xaccel don't require a kernel
compile just to work.  We have the room now, so what the heck.

Reqested by:    Thomas Roell <roell@xig.com>
1999-04-16 18:27:18 +00:00
Nick Hibma
ec71ab8ec3 Remove the entries for umodem and ucom. These drivers only probe
and attach, nothing else. This is confusing to people.
1999-04-16 16:17:05 +00:00
Bruce Evans
6b2480cf2e Removed dead code and cleaned up. setconf() now just asks for the
root device name.  The parser for the name is still too simple (it
forces slice = none, partition = 'a').
1999-04-15 15:35:32 +00:00
Bruce Evans
e05da2e941 Made booting with -a work for all configurations. Previously it
only worked for configurations with "swap on generic".

usr.sbin/config/config.y:
- ignore all "swap [on] device ...' specifications except for
  warning about them.  They haven't done anything related to swap
  for almost 4 years, and were previously silently ignored,
  except for "swap on generic" which stopped swap${KERNEL}.c
  from being generated.  Code to support swapping is now deader
  than before.

usr.sbin/config/mkswapconf.c:
- don't generate a dummy setconf() function in swap${KERNEL}.c.

sys/i386/conf/files.i386:
- swapgeneric.c is now standard.  It should be merged into autoconf.c
  so that it doesn't conflict with swap${KERNEL}.c for kernels named
  "generic".

sys/i386/i386/autoconf.c:
- don't call setroot() for mfs roots.  Since setroot() doesn't do anything
  harmful, this was just a waste of time, except possibly for booting with
  -a it may have helped prevent an undesireable call to setconf() by
  finding a bogus rootdev.
- honor -a for ffs roots.  -a now overrides all other ways of specifying
  the root device.  Previously, -r had precedence over -a, and the -a
  handling was usually a no-op.
- don't honor -a for non-ffs roots, since it would currently just get in
  the way of a clean panic.

sys/i386/i386/swapgeneric.c:
- don't declare things that are now always declared in swap${KERNEL}.c.
  Don't decide things that are now decided in autoconf.c.  Code to
  support the "generic" case is now dead instead of useless.
1999-04-15 14:52:24 +00:00
Peter Wemm
7bf01a1401 Add example for 'makeoptions DEBUG' and some notes. I have not activated
it here since a -g LINT kernel is 100% useless as it won't run and hence
doesn't need debug capabilities (and would just waste disk space :-).
1999-04-14 16:54:00 +00:00
Bruce Evans
173c0b9aba Search bdevsw[] instead of the half-baked builtin table of devices
in the RB_ASKNAME case.  I had thought that I made this change in
rev.1.18, but rev.1.18 only affects obscure subcases of the
RB_DFLTROOT case (subcases where the compiled in default root is
not found in bdevsw[] -- then the root device is set to the first
device in the half-baked table that is also in bdevsw[]).

Removed yet more vestiges of config-time swap configuration.
1999-04-14 15:20:03 +00:00
Bruce Evans
6a9df7a421 Generate intrnames[] dynamically. This should be new-bus friendly.
Old version reviewed by: se
1999-04-14 14:26:36 +00:00
Peter Wemm
112904833c Add a commented-out example on using the makeoptions command to get a
kernel.debug.
1999-04-13 20:59:36 +00:00
Peter Wemm
b9da114482 Build the functionality of the wdc_p hack into the ide_pci.c code.
All it did was match a specific device ID and turn on a quirk for
the wdc driver.

Incidently, at line 1462 there is a return that prevents the generic
ide_pci code from trying to look at the device.  I'd be interested
to know if we can take out the return and let the generic code "see" it.
I've left the return in because that's the way it worked before.

(Be sure to rerun config after cvsup or you'll get undefined files!)
1999-04-13 20:22:34 +00:00
Peter Wemm
3e3e4375c8 Shoot the LKM support in the old wd/wdc/atapi driver set in the head and
perform a cleanup/unifdef sweep over it to tidy things up.  The atapi
code is permanently attached to the wd driver and is always probed.

I will add an extra option bit in the flags to disable an atapi probe on
either the master or slave if needed, if people want this.

Remember, this driver is destined to die some time.  It's possible that
it will loose all atapi support down the track and only be used for
dumb non-ATA disks and all ata/atapi devices will be handled by the new
ata system.

ATAPI, ATAPI_STATIC and CMD640 are no longer options, all are implicit.

Previously discussed with:  sos
1999-04-13 19:38:12 +00:00
Peter Wemm
4e8691dc95 Clean up the kernel/kernel.debug/install.debug etc stuff.
Sense ${DEBUG} to decide on building kernel.debug or not.
Use a common install and install.debug target to minimize duplication.
(I deleted the ELF transition kernel warning, it was getting dated..)
1999-04-13 18:25:08 +00:00
Tor Egge
87c737bc83 Backout early start of APs since it caused some machines to hang. 1999-04-13 03:24:47 +00:00
Brian Somers
7b598cd2e7 ppp != iijppp any more
Mention nos-tun as a tun device user.
1999-04-12 09:45:29 +00:00
Nick Hibma
7dc1a5bd17 Make debugging more selective.
Remove debugging options from GENERIC
1999-04-11 20:53:50 +00:00
Peter Wemm
b4718cedf6 Move initialization of SWI's in the tty|net|bio masks from isa.c into
the static initializers in ipl.s.
1999-04-11 15:51:15 +00:00
Greg Lehey
4357ca882d Back out default debug kernel. The flags revert to historical behaviour.
Requested-by:	ache
		bde
		dg

Modify targets for debug kernels:  when -g was specified, make will
now build a debug kernel called kernel.debug, and create a stripped
version called kernel at the same time.  The two targets install and
install.debug are otherwise unchanged.

Requested-by:	dillon

Update man page accordingly.
1999-04-11 03:40:11 +00:00
Eivind Eklund
4e697da8b3 Correct prototype for wdstart 1999-04-11 03:10:25 +00:00
Eivind Eklund
c6d0e3f0c1 Staticize. 1999-04-11 03:06:07 +00:00
Eivind Eklund
bff24b1f66 Random text after #endif changed to comment. 1999-04-11 02:58:31 +00:00
Tor Egge
44c57e7121 Add prototype for wait_ap(). 1999-04-11 00:43:43 +00:00
Tor Egge
90c26b0d2d Let BSP wait until all APs are initialized. 1999-04-10 22:58:29 +00:00
Tor Egge
c8464c3072 When trying to enable or disable an interrupt not described by the mp table,
just return instead of dereferencing a null pointer.
1999-04-10 19:22:17 +00:00
Tor Egge
0bf47fca4f Test CF after a btrl operation instead of testing ZF (which is undefined). 1999-04-10 19:19:02 +00:00
Nick Hibma
8f2a96f2cb uncomment the uhci entry 1999-04-10 15:23:12 +00:00
Alan Cox
53134efb59 pmap_remove_pte:
Use "loadandclear" to update the pte.

pmap_changebit and pmap_ts_referenced:
	Switch to pmap_TLB_invalidate from invltlb.
1999-04-10 02:58:17 +00:00
Nik Clayton
c64aec80f8 Add a warning bout the SoundBlaster and ISA DMA locking up the machine,
and a possible workaround.

PR:		docs/5358
Submitted by:	Matthew Dillon
Reviewed by:	nik
1999-04-09 21:14:56 +00:00
KATO Takenori
4ebe777123 o sys/i386/include/soundcard.h
Reduce synth_info.name lenght for binary compatibility.

o sys/i386/isa/sound/mpu401.c
   Reduce mpu device number info to avoid overflow of mpu_synth_info.name.

Submitted by:	Akio Morita <amorita@meadow.scphys.kyoto-u.ac.jp>
1999-04-08 08:09:34 +00:00
Peter Wemm
bfda1e3ff7 Disable the mtrr copy calls, it doesn't work with the i686_mem.c stuff.
This should make it compile/link again.
1999-04-07 17:08:40 +00:00
Greg Lehey
2005b07aa8 1. Modify config to issue different code for debugging.
2.  Config complains if you use -g:

    Debugging is enabled by default, there is no ned to specify the -g option

3.  Config warns you if you don't use -s:

    Building kernel with full debugging symbols.  Do
    "config -s BSD" for historic partial symbolic support.
    To install the debugging kernel, do make install.debug

    (BSD was the name of the config file I used; I print out the same
    name).

4.  Modify Makefile.i386, Makefile.alpha, Makefile.pc98 and config to
    work if a kernel name other than 'kernel' is specified.  This is
    not absolutely necessary, but useful, and it was relatively easy.
    I now have a kernel called /crapshit :-)

5.  Modify Makefile.i386, Makefile.alpha, Makefile.pc98 "clean" target
    to remove both the debug and normal kernel.

6.  Modify all to install the stripped kernel by default and the debug
    kernel if you enter "make install.debug".

7.  Update version number of Makefiles and config.
1999-04-07 09:28:03 +00:00
Mike Smith
1f2d03c05e Add defines for the P6 model-specific registers. 1999-04-07 03:58:15 +00:00
Mike Smith
4ffd949eaa mem.c
Split out ioctl handler a little more cleanly, add memory
	range attribute handling for both kernel and user-space
	consumers.

pmap.c
	Remove obsolete P6 MTRR-related code.

i686_mem.c
	Map generic memory-range attribute interface to the P6 MTRR
	model.
1999-04-07 03:57:45 +00:00
Mike Smith
90ea793afe Add i686_mem.c - memory range attribute support for P6 processors. 1999-04-07 03:55:36 +00:00
Poul-Henning Kamp
bbca5c9c2c failled spell-check 1999-04-06 21:15:18 +00:00