Commit Graph

2489 Commits

Author SHA1 Message Date
Paul Saab
c206a8609e Change the behavior of isa_nmi to log an error message instead of
panicing and return a status so that we can decide whether to drop
into DDB or panic.  If the status from isa_nmi is true, panic the
kernel based on machdep.panic_on_nmi, otherwise if DDB is
enabled, drop to DDB based on machdep.ddb_on_nmi.

Reviewed by:	peter, phk
2000-08-06 14:17:21 +00:00
Tor Egge
e666f57c3e Be more verbose when changing APIC ID on an IO APIC.
Don't allow cpu entries in the MP table to contain APIC IDs out of range.

Don't write outside array boundaries if an IO APIC entry in the MP table
contains an APIC ID out of range.

Assign APIC IDs for all IO APICs according to section 3.6.6 in the
Intel MP spec:

  - If the current APIC ID on an IO APIC doesn't conflict with other
    IO APICs or CPUs, that APIC ID should be used.  The copy of the MP
    table must be updated if the corresponding APIC ID in the MP table
    is different.

  - If the current APIC ID was in conflict with other units, the
    corresponding APIC ID specified in the MP table is checked for conflict.

  - If a conflict is still found then fall back to using a new unique ID.
    The copy of the MP table must be updated.

  - IDs out of range is considered to be in conflict.

During these operations, the IO_TO_ID array cannot be used, since any
conflict would have caused information loss.  The array is then corrected,
since all APIC ID conflicts should have been resolved.

PR:	20312, 18919
2000-08-06 00:04:03 +00:00
Luoqi Chen
3fb50adb4c Handle write page faults (both write only or read-modify-write) as MI vm
write-only faults.  This would allow write-only mmapped regions to function
correctly.
2000-07-31 14:47:14 +00:00
Poul-Henning Kamp
0825a8a33f Allow use of TSC even if APM is compiled in but disabled. 2000-07-30 21:05:22 +00:00
David E. O'Brien
ff6804717c Revert previous commit. Not all RAID controllers are SCSI. 2000-07-29 02:12:44 +00:00
David E. O'Brien
c79ef5d331 Move the RAID controllers next to the SCSI controllers. 2000-07-29 02:00:28 +00:00
David E. O'Brien
cf10fa4fcd Comment out ncr' as sym' handles all that `ncr' does.
(only commented out to make it easy for people to find it that really
 wants it.)

Asked for by:	Peter
2000-07-29 01:31:09 +00:00
Peter Wemm
abe0ccd784 Fix warning - isa/isavar.h is a prerequisite for isa/pnpvar.h 2000-07-28 22:58:28 +00:00
Bill Fumerola
78a40870e5 s%LINT%NOTES%g 2000-07-25 08:25:48 +00:00
Warner Losh
b16ba28faf Default the pcic to polling. Some laptops need to have polling mode
due to a paucity of IRQs.  I have some reservations about this, so I'm
not going to MFC this just yet.  I'm doing this to see how many
problems it causes so we can do this in 4.2.  I've been seeing hangs
on my laptop from time to time, but sometimes it was not in polling
mode, other tmies it was.  Don't know if this is one problem or more
than one.

Requested by: Sean O Connell
2000-07-19 16:32:38 +00:00
Paul Saab
88f675ba30 Change the way NMI's are handled. Before, if DDB was enabled and
a NMI occured, you could type continue in DDB and the kernel would
not attempt to detect what type of NMI was recieved.  Now we check
for the type of NMI first and then go to DDB if it is enabled.

This will solve the problem with having DDB enabled and getting an
NMI due to some possibly bad error and being able to continue the
operation of the kernel when you really want to panic and know
what happened.

Submitted by:	jhb
2000-07-14 11:49:44 +00:00
Seigo Tanimura
fb0ef52838 Finally merge newmidi.
(I had been busy for my own research activity until the last weekend)

Supported devices:

SB Midi Port			(sbc + midi)
SB OPL3				(sbc + midi)
16550 UART			(midi, needs a trick in your hint)
CS461x Midi Port		(csa + midi)

OSS-compatible sequencer	(seq)

Supported playing software:

playmidi			(We definitely need more)

Notes:

/dev/midistat now reports installed midi drivers. /dev/sndstat reports
only pcm drivers. We need the new name(pcmstat?).

EMU8000(SB AWE) does not sound yet but does get probed so that the OPL3
synth on an AWE card works.

TODO:

MSS/PCI bridge drivers
Midi-tty interface to support general serial devices
Modules
2000-07-11 11:49:33 +00:00
Matt Jacob
08a7e04845 Removing commented out devices I added. 2000-07-10 15:18:20 +00:00
Kris Kennaway
26eaf5dcb8 Don't call printf with no format string.
Reviewed by:	msmith
2000-07-10 05:51:56 +00:00
Matt Jacob
62d132e3ab Oops- remove the '0' appended to targbh. 2000-07-08 07:05:40 +00:00
Matt Jacob
94ad21f31a Add in the commented out SCSI device entries of
#device         ses             # SCSI Environmental Services (and SAF-TE)
#device         targ            # SCSI Target Mode Code
#device         targbh0         # SCSI Target Mode Blackhole Device
#define         pt              # SCSI Processor Target Device

so that people know that they are there.
2000-07-08 07:02:58 +00:00
Poul-Henning Kamp
77978ab8bc Previous commit changing SYSCTL_HANDLER_ARGS violated KNF.
Pointed out by:	bde
2000-07-04 11:25:35 +00:00
Kirk McKusick
bdbd3ff7cf Update tags directive to reflect the new location of soft updates
and the reorganization of the eisa directory.
2000-07-04 00:18:43 +00:00
Poul-Henning Kamp
82d9ae4e32 Style police catches up with rev 1.26 of src/sys/sys/sysctl.h:
Sanitize SYSCTL_HANDLER_ARGS so that simplistic tools can grog our
sources:

        -sysctl_vm_zone SYSCTL_HANDLER_ARGS
        +sysctl_vm_zone (SYSCTL_HANDLER_ARGS)
2000-07-03 09:35:31 +00:00
Brian S. Dean
c6d3f3bfc1 Fix my own style bugs (use of spaces instead of tabs for indentation).
This is a style-only change.
2000-07-01 02:40:13 +00:00
Mark Murray
8567cb9f5d Duh. Fix a fatfingered patch. 2000-06-25 19:06:48 +00:00
Mark Murray
493c240c48 Fix an uninitialised variable and a function return value.
Reported by:	dillon
2000-06-25 17:26:47 +00:00
Mark Murray
15bbdecf2e Get the build bits right for the new Architecture Independant null- and
entropy drivers.
Reviewed by:	dfr(mostly)
2000-06-25 09:18:13 +00:00
Mark Murray
5afffbaa08 Strip out the machine-independant parts of the memory device.
/dev/(u)random, /dev/null, /dev/zero are all moving to machine-independant
drivers.
Reviewed by:	dfr
2000-06-25 09:08:27 +00:00
Steve Passe
80940373ed Fixed atpic_attach() for the SMP (specifically APIC_IO) case.
Approved by:	msmith@freebsd.org
2000-06-24 23:55:38 +00:00
Mike Smith
bb9c06c1ce Make the PnP 'slopsucker' quiet in the !bootverbose case - the real NPX
probe happens much earlier, and may come to very different conclusions
about the system's NPX setup.
2000-06-23 08:19:50 +00:00
Mike Smith
49b66ff559 Add a stub driver to consume the PnP "system resource" items, and hide
them in the !bootverbose case.
2000-06-23 08:18:53 +00:00
Mike Smith
2a50a6d730 Add PnP probe methods to some common AT hardware drivers. In each case,
the PnP probe is merely a stub as we make assumptions about some of this
hardware before we have probed it.

Since these devices (with the exception of the speaker) are 'standard',
suppress output in the !bootverbose case to clean up the probe messages
somewhat.
2000-06-23 07:44:33 +00:00
Mike Smith
93e5f19e07 Stop trying to do anything funny with the interrupt resource range. The
AT PIC will consume IRQ 2 correctly in the !APIC_IO case.
2000-06-23 07:38:24 +00:00
Peter Wemm
bc26591656 Add SOFTUPDATES to GENERIC (BOOTMFS has this filtered out) 2000-06-22 06:01:02 +00:00
Poul-Henning Kamp
4bd02a5609 Add disk_enumerate() for finding names of disks. Vinum and libh will
need this RSN.

Remove a pointless warning in the root device locating code.

Remove the "wd" compatibility name from the "ad" driver.

WARNING: If you have not updated to use /dev/wd* in your /etc/fstab
and modern bootblocks, it would be a very good idea to do so BEFORE
you upgrade your kernel.
2000-06-15 20:30:53 +00:00
Bruce Evans
933aec2f75 Fixed syntax errors and style bugs in previous commit. The syntax
errors were normally harmless because they were in unreachable code
and gcc apparently doesn't check the syntax inside asm statements
that it optimizes away.
2000-06-14 18:48:39 +00:00
Peter Wemm
1c3b2e3b7d s/iomem/maddr/ - these were generated from an older verion of the
gethints script. :-(
2000-06-14 10:01:39 +00:00
Peter Wemm
f71c01cc52 Borrow phk's axe and apply the next stage of config(8)'s evolution.
Use Warner Losh's "hint" driver to decode ascii strings to fill the
resource table at boot time.

config(8) no longer generates an ioconf.c table - ie: the configuration
no longer has to be compiled into the kernel.  You can reconfigure your
isa devices with the likes of this at loader(8) time:
  set hint.ed.0.port=0x320

userconfig will be rewritten to use this style interface one day and will
move to /boot/userconfig.4th or something like that.

It is still possible to statically compile in a set of hints into a kernel
if you do not wish to use loader(8).  See the "hints" directive in GENERIC
as an example.

All device wiring has been moved out of config(8).  There is a set of
helper scripts (see i386/conf/gethints.pl, and the same for alpha and pc98)
that extract the 'at isa? port foo irq bar' from the old files and produces
a hints file.  If you install this file as /boot/device.hints (and update
/boot/defaults/loader.conf - You can do a build/install in sys/boot) then
loader will load it automatically for you.  You can also compile in the
hints directly with:  hints "device.hints"  as well.

There are a few things that I'm not too happy with yet.  Under this scheme,
things like LINT would no longer be useful as "documentation" of settings.
I have renamed this file to 'NOTES' and stored the example hints strings
in it.  However... this is not something that config(8) understands, so
there is a script that extracts the build-specific data from the
documentation file (NOTES) to produce a LINT that can be config'ed and
built.  A stack of man4 pages will need updating. :-/

Also, since there is no longer a difference between 'device' and
'pseudo-device' I collapsed the two together, and the resulting 'device'
takes a 'number of units' for devices that still have it statically
allocated.  eg:  'device fe 4' will compile the fe driver with NFE set
to 4.  You can then set hints for 4 units (0 - 3).  Also note that
'device fe0' will be interpreted as "zero units of 'fe'" which would be
bad, so there is a config warning for this.  This is only needed for
old drivers that still have static limits on numbers of units.
All the statically limited drivers that I could find were marked.

Please exercise EXTREME CAUTION when transitioning!

Moral support by: phk, msmith, dfr, asmodai, imp, and others
2000-06-13 22:28:50 +00:00
KATO Takenori
8f4b3d8c63 Recognize Coppermine Celeron processors whose CPU ID = 0x68?. They
were recognized as "Pentium III/Pentium III Xeon."
2000-06-13 12:33:45 +00:00
KATO Takenori
65cbb03cfe Added new options CPU_PPRO2CELERON and CPU_L2_LATENCY to support
Socket 8 to 370 converters.  When (1) CPU_PPRO2CELERON option is
defined, (2) Intel CPU is found and (3) CPU ID is 0x66?, L2 cache is
enabled through MSR 0x11e.  The L2 cache latency value can be
specified by CPU_L2_LATENCY option.  Default value of L2 cache latency
is 5.

These options are useful if you use Socket 8 to Socket 370 converter
(e.g. Power Leap's PL-Pro/II.)  Most PentiumPro BIOSs don't enable L2
cache of Mendocino Celeron CPUs because they don't know Celeron CPUs.
These options are needles if you use a Coppermine (FCPGA) Celeron or
PentiumIII, becuase the L2 cache enable bit is hard wired and L2 cache
is always enabled.
2000-06-13 09:10:37 +00:00
Mike Smith
4f443c2c44 Don't include opt_smp.h - we don't use anything defined in it. 2000-06-10 22:59:50 +00:00
Mike Smith
6eb9d785ef Correct the tests for ISA PIC/APIC so that they actually work. 2000-06-10 22:56:09 +00:00
Peter Wemm
896e5fddc5 Unused include: #include "ether.h" 2000-06-10 07:13:26 +00:00
Peter Wemm
0d74cc4841 Add option BROKEN_KEYBOARD_RESET to an opt_*.h file 2000-06-10 02:05:57 +00:00
Bruce Evans
129e169651 Always include the full symbol table (as specified by its start and
end values in bootinfo) in kernel space if it is loaded (i.e., if its
specified end address is nonzero), not just if it is loaded and DDB
is configured.  This may be used to fix kldsym(2) for booting without
/dev/loader; currently, in this case, it just fixes unused pointers
and wastes space consistently.  For booting in the normal way with
/boot/loader, the table is included and pointed to in a different way
and kldsym(2) works.
2000-06-08 17:53:43 +00:00
Mitsuru IWASAKI
6b3f7b4cd3 Fix gdt pointer for the current cpu on SMP.
This will support power-off only.  Fix for suspend/resume will come later.
Also, MFC on this is shceduled on next week.

Submitted by:	sumitani@bd2.hnes.nec.co.jp
Reviewed by:	jlemon
2000-06-07 17:01:52 +00:00
Matthew Dillon
50ed7dfec0 INTR_TYPE_FAST / FAST_INTR interrupts (currently just serial interrupts)
have their own lock and do not need the MP lock.  The SMP cleanup was
    a little too conservative in MP locking fast interrupts but at least
    it's trivial to fix.  MFC soon.

Submitted by: bde
2000-06-06 15:28:00 +00:00
Bruce Evans
29893f43a9 Fixed some style bugs in the signal handling funcations. This doesn't
change the object file.
2000-06-03 14:19:01 +00:00
Mike Smith
c3c50c4e3a Further fixes for multiple-IO-APIC systems from Tor Egge:
Further experimentation showed that some Dell 2450 machines with the
prevention kludge installed still got T_RESERVED traps.  CPU interrupt
vector 0x7A was observed to be triggered.  This might have been the
bitwise OR of two different vectors sent from each of the IOAPICs at
the same time.

	IOAPIC #0: 0x68 --> irq 8: RTC timer interrupt
	IOAPIC #1: 0x32 --> irq 18: scsi host adapter or network interface
		   ----
		   0x7a --> T_RESERVED

Both IOAPICs had ID 0.

Appendix B.3 in the MP spec indicates that the operating system is
responsible for assigning unique IDs to the IOAPICs.

The enclosed patch programs the IOAPIC IDs according to the IOAPIC
entries in the MP table.

Submitted by:	tegge
2000-05-31 21:37:28 +00:00
Mike Smith
11ca1e30c7 Bump the default NBUS value to 8. 2000-05-31 19:01:45 +00:00
Bruce Evans
6b4a3ce242 Pack the SWI bits to save some time and space. 2000-05-31 16:36:20 +00:00
Bruce Evans
5f582114dd Add SWI_TQ_MASK to all interrupt masks except SWI_CLOCK_MASK. Use a
new macro SWI_LOW_MASK to give the mask for low priority SWIs instead
of hard-coding this mask as SWI_CLOCK_MASK.

Reviewed by:	dfr
2000-05-31 13:32:28 +00:00
Brian Feldman
c0c5a953c0 Change sl(4) configuration lines to reflect its new dynamic nature. 2000-05-30 23:01:37 +00:00
Matthew Dillon
8b03c8ed5e This is a cleanup patch to Peter's new OBJT_PHYS VM object type
and sysv shared memory support for it.  It implements a new
    PG_UNMANAGED flag that has slightly different characteristics
    from PG_FICTICIOUS.

    A new sysctl, kern.ipc.shm_use_phys has been added to enable the
    use of physically-backed sysv shared memory rather then swap-backed.
    Physically backed shm segments are not tracked with PV entries,
    allowing programs which use a large shm segment as a rendezvous
    point to operate without eating an insane amount of KVM in the
    PV entry management.  Read: Oracle.

    Peter's OBJT_PHYS object will also allow us to eventually implement
    page-table sharing and/or 4MB physical page support for such segments.
    We're half way there.
2000-05-29 22:40:54 +00:00
Doug Rabson
3e8965ac09 Add SWI_TQ_MASK to imask definition. 2000-05-29 19:40:42 +00:00
Doug Rabson
1536418a84 Brucify the pmap_enter_temporary() changes. 2000-05-29 19:21:01 +00:00
Doug Rabson
31891bc2bd Add a new pmap entry point, pmap_enter_temporary() to be used during
dumps to create temporary page mappings. This replaces the use of CADDR1
which is fairly x86 specific.

Reviewed by: dillon
2000-05-28 15:49:55 +00:00
Peter Wemm
e60463deed Redo the isa compat driver shim so that each driver is self contained
and does not require that evil list of drivers in isa_compat.h.
It uses the same strategy that pci drivers use, namely a
COMPAT_ISA_DRIVER() macro that creates the glue on the fly.
Theoretically old-style isa drivers should be preloadable now.
2000-05-28 13:30:44 +00:00
John Baldwin
f20dd05a67 - Remove unnecessary 'data32' and 'addr32' prefixes and #define's.
- Go ahead and use 'lgdt' again instead of hand-assembling the instruction.
  During testing this code worked fine.  If for some reason a 32-bit offset
  is needed, 'lgdtl' should be used instead of reverting to manual machine
  code.

Tested by:	peter
2000-05-27 06:25:35 +00:00
Jake Burkholder
e39756439c Back out the previous change to the queue(3) interface.
It was not discussed and should probably not happen.

Requested by:		msmith and others
2000-05-26 02:09:24 +00:00
Tor Egge
5bb4998cca Reintroduce a workaround for a gas bug (misassembled lgdt instruction)
Use .code16 for the real mode part of the AP bootstrap trampoline code.
2000-05-25 21:33:52 +00:00
Peter Wemm
9f85bc03de pmap_enter() masked off the page offset bits, pmap_kenter() did not.
This (I believe) is the cause of the XFree86 startup and/or mptable(8)
panics when programs were reading from /dev/mem at non-page-aligned
offsets.  The offsets were being converted into random page flags in the
page tables. :-(   (including PG_PS = 4MB page size)
2000-05-24 14:22:22 +00:00
Jun Kuriyama
569e965893 Add OPTi 82C700 chipset.
Submitted by:	sanpei@sanpei.org
PR:		kern/18155 (part of)
2000-05-24 09:03:30 +00:00
Jun Kuriyama
3cc13eb5b1 Add 440MX chipset.
Submitted by:	YOSHIMURA Hideaki <hideakiy@cs-tokyo01.chuosystem.co.jp>
References:	[bsd-nomads:13764]
2000-05-24 02:24:38 +00:00
Jake Burkholder
740a1973a6 Change the way that the queue(3) structures are declared; don't assume that
the type argument to *_HEAD and *_ENTRY is a struct.

Suggested by:	phk
Reviewed by:	phk
Approved by:	mdodd
2000-05-23 20:41:01 +00:00
David E. O'Brien
d4af7a50dc Sort the sys includes. 2000-05-22 17:09:13 +00:00
Dan Moschuk
4f14ee00f2 sysctl'ize ICMP_BANDLIM and ICMP_BANDLIM_SUPPRESS_OUTPUT.
Suggested by: des/nbm
2000-05-22 16:12:28 +00:00
Peter Wemm
0385347c1a Implement an optimization of the VM<->pmap API. Pass vm_page_t's directly
to various pmap_*() functions instead of looking up the physical address
and passing that.  In many cases, the first thing the pmap code was doing
was going to a lot of trouble to get back the original vm_page_t, or
it's shadow pv_table entry.

Inspired by: John Dyson's 1998 patches.

Also:
Eliminate pv_table as a seperate thing and build it into a machine
dependent part of vm_page_t.  This eliminates having a seperate set of
structions that shadow each other in a 1:1 fashion that we often went to
a lot of trouble to translate from one to the other. (see above)
This happens to save 4 bytes of physical memory for each page in the
system.  (8 bytes on the Alpha).

Eliminate the use of the phys_avail[] array to determine if a page is
managed (ie: it has pv_entries etc).  Store this information in a flag.
Things like device_pager set it because they create vm_page_t's on the
fly that do not have pv_entries.  This makes it easier to "unmanage" a
page of physical memory (this will be taken advantage of in subsequent
commits).

Add a function to add a new page to the freelist.  This could be used
for reclaiming the previously wasted pages left over from preloaded
loader(8) files.

Reviewed by:	dillon
2000-05-21 12:50:18 +00:00
Greg Lehey
3320b1fe44 Correct previous commit: solve the "stopped clock" syndrome in remote
kernel debugger.
2000-05-18 02:29:23 +00:00
Mike Smith
f0ba8e211c Implement real read/write barriers for the i386. Despite the comment in
previous versions of this file, some barrier functionality is required.
2000-05-18 00:06:10 +00:00
Mike Smith
642ba07a24 If we are running in APIC_IO mode, pretend that we didn't see the BIOS
reporting an AT PIC.  We do this because otherwise the PIC will claim
IRQ 2 in an unshareable mode, preventing other devices from legitimately
using it.

For symmetry, in !APIC_IO mode, ignore the APIC if it's reported.

This is a hack; a better solution would have the PIC's driver release
the IRQ if it was not going to be active.
2000-05-17 19:44:16 +00:00
Tim Vanderhoek
214d1c55f7 Change to comments only: spell FreeBSD.org correctly 2000-05-13 11:21:19 +00:00
John Baldwin
558d6032c2 Turn on USB support for most USB devices. udbp is not turned on since
NETGRAPH is not present in GENERIC at the moment.  Also, change some
settings to support USB installs:

- Add KBD_INSTALL_CDEV as an option to make /dev/kbd[01] actually work.
- Turn on keyboard probing in sc0.  The syscons driver will now use a
  flag documented in ukbd(4) but not in sc(4) that tells syscons to
  actively search for a keyboard device if none is found.  This allows
  USB keyboards to just be plugged in and instantly start working.
- Require the atkbd0 driver to actually probe to see if a keyboard is
  there.  This allows USB keyboards to be seen by sc0 if an AT keyboard
  isn't plugged into the computer.  This also means that you will no
  longer be able to plug an AT keyboard into a machine after it has
  booted a GENERIC kernel and use it.  AT keyboards aren't designed for
  this anyway.  USB keyboards are designed for this, and they work.
2000-05-12 03:05:35 +00:00
Peter Wemm
933676242d Move <machine/ipl.h> outside #ifdef SMP because it supplies AST_RESCHED.
Without this, it shows up as an undefined symbol in /kernel. (!)
(This looks very freaky when doing a nm /kernel!)
2000-05-11 02:32:36 +00:00
David E. O'Brien
fc81cf82e9 1. `movl' is for use with 32-bit operands. Do NOT use it with 16-bit
operands.  `movw' could be used, but instead let the assembler decide
   the right instruction to use.
2. AT&T asm syntax requires a leading '*' in front of the operand for
   indirect calls and jumps.
2000-05-10 01:24:23 +00:00
David E. O'Brien
25f0103084 When using _asm{} in GCC, one must specify the operand's size if one
specifies the instruction's operation size.  GCC will default to 32-bit
operands reguardless of the prototype (ie, formal parameters' type)
of an inline function.
2000-05-10 01:15:55 +00:00
David E. O'Brien
7ff3366e73 Do not specify the size to move. Allow the assembler to figure it out. 2000-05-10 01:06:39 +00:00
Poul-Henning Kamp
9626b608de Separate the struct bio related stuff out of <sys/buf.h> into
<sys/bio.h>.

<sys/bio.h> is now a prerequisite for <sys/buf.h> but it shall
not be made a nested include according to bdes teachings on the
subject of nested includes.

Diskdrivers and similar stuff below specfs::strategy() should no
longer need to include <sys/buf.> unless they need caching of data.

Still a few bogus uses of struct buf to track down.

Repocopy by:    peter
2000-05-05 09:59:14 +00:00
Garrett Wollman
54f1d0cefe Add a little do-nothing ``slopsucker'' device which gives a home
to PNP0c04 (legacy ISA coprocessor support).  Tourist info.
2000-05-04 23:57:32 +00:00
Mike Smith
ac9b3dacb2 Don't assume that the PCI BIOS is going to clear the unused bits in %ecx
when it returns.
2000-05-04 17:44:55 +00:00
Doug White
776d0c43b4 I mentioned yesterday that I could use some work, and Kelly says, "Commit my
PRs!"  So here I go.

Add definitions for some of the AMD CPU feature bits.  Also add a comment on
where to find the rest of them. This is a purely cosmetic change.

PR:		i386/14438
Submitted by:	Kelly Yancey <kbyanc@egroups.net>
2000-05-03 18:07:30 +00:00
Warner Losh
0ab302bfbe Move sn and cs drivers from the compat section to the real section.
Enable xe driver now that I've had reports that it works.

PR: 18323
Submitted by: MIHIRA Yoshiro-san
2000-05-03 00:49:57 +00:00
Nick Hibma
b5ea1f0c77 The USB double bulk pipe driver (Host to host cables). Currently there
are two supported chips, the NetChip 1080 (only prototypes available)
and the EzLink cable. Any other cable should be supported however as they
are all very much alike (there is a difference between them wrt
performance).

It uses Netgraph.

This driver was mostly written by Doug Ambrisko and Julian Elischer and
I would like to thank Whistle for yet another contribution. And my
aplogies to them for me sitting on the driver for so long (2 months).

Also, many thanks to Reid Augustin from NetChip for providing me with a
prototype of their 1080 chip.

Be aware of the fact that this driver is very immature and has only been
tested very lightly. If someone feels like learning about Netgraph however
this is an excellent driver to start playing with.
2000-05-01 22:48:23 +00:00
Peter Wemm
ab063af911 Move the MSG* and SEM* options to opt_sysvipc.h
Remove evil allocation macros from machdep.c (why was that there???) and
use malloc() instead.
Move paramters out of param.h and into the code itself.
Move a bunch of internal definitions from public sys/*.h headers (without
#ifdef _KERNEL even) into the code itself.

I had hoped to make some of this more dynamic, but the cost of doing
wakeups on all sleeping processes on old arrays was too frightening.
The other possibility is to initialize on the first use, and allow
dynamic sysctl changes to parameters right until that point. That would
allow /etc/rc.sysctl to change SEM* and MSG* defaults as we presently
do with SHM*, but without the nightmare of changing a running system.
2000-05-01 13:33:56 +00:00
Peter Wemm
621372ff84 Mark two functions as private. 2000-04-29 07:48:37 +00:00
Greg Lehey
12216bb553 Fix a long-standing bug which caused massive character loss in remote
serial gdb: interrupts were causing either overruns or stealing
characters.  Put splhigh() around the routines which transfer packets
across the line.  Since this happens when the system is halted in
debug, this doesn't cause any particular problem.  Now it is possible
to run the link at 115,200 bps.

PR:    (not assigned yet, must be in limbo somewhere)

Add partial support for detecting non-existent gdb devices.

Add $FreeBSD$ tag.
2000-04-25 01:41:57 +00:00
David E. O'Brien
b0e56cde37 * Use sys/sys/random.h rather than a i386 specific one.
* There was nothing that should be machine dependant about
  i386/isa/random_machdep.c, so it is now sys/kern/kern_random.c.
2000-04-24 17:30:08 +00:00
Yoshihiro Takahashi
5de4ba3c6f Disable PCI BIOS on PC-98. 2000-04-23 10:30:09 +00:00
Yoshihiro Takahashi
b39b38ecd0 - PC-98 uses IRQ2 too.
- Fixed the range of DMA channels on PC-98.

Submitted by:	"T.Yamaoka" <taka@windows.squares.net>
2000-04-22 15:19:22 +00:00
Luoqi Chen
c71d557034 IO apics are not necessarily page aligned, they are only required to be aligned
on 1K boundary. Correct a typo that would cause problem to a second IO apic.

Pointed out by:	Steve Passe	<smp.csn.net>
2000-04-20 14:40:11 +00:00
Poul-Henning Kamp
ed6aff7387 Remove unneeded <sys/buf.h> includes.
Due to some interesting cpp tricks in lockmgr, the LINT kernel shrinks
by 924 bytes.
2000-04-18 15:15:39 +00:00
Mike Smith
300451c472 Some more i386-only BIOS-friendliness:
- Add support for using the PCI BIOS functions for configuration space
   accesses, and make this the default.

 - Make PNPBIOS the default (obsoletes the PNPBIOS config option).

 - Add two new boot-time tunables to disable each of the above.
2000-04-16 20:48:33 +00:00
Jeroen Ruigrok van der Werven
aec5a3b342 Fix typo, extentions -> extensions
Submitted by:	George Cox <gjvc@sophos.com>
2000-04-15 18:46:15 +00:00
Poul-Henning Kamp
8177437d85 Complete the bio/buf divorce for all code below devfs::strategy
Exceptions:
        Vinum untouched.  This means that it cannot be compiled.
        Greg Lehey is on the case.

        CCD not converted yet, casts to struct buf (still safe)

        atapi-cd casts to struct buf to examine B_PHYS
2000-04-15 05:54:02 +00:00
Warner Losh
0d5c223da4 Awi driver, ported from NetBSD from Atsushi Once-san.
From the README:
	Any IEEE 802.11 cards use AMD Am79C930 and Harris (Intersil) Chipset
	with PCnetMobile firmware by AMD.
	   BayStack 650   1Mbps Frequency Hopping PCCARD adapter
	   BayStack 660   2Mbps Direct Sequence PCCARD adapter
	   Icom SL-200    2Mbps Direct Sequence PCCARD adapter
	   Melco WLI-PCM  2Mbps Direct Sequence PCCARD adapter
	   NEL SSMagic    2Mbps Direct Sequence PCCARD adapter
	   Netwave AirSurfer Plus
			  1Mbps Frequency Hopping PCCARD adapter
	   Netwave AirSurfer Pro
			  2Mbps Direct Sequence PCCARD adapter

Known Problems:
	WEP is not supported.
	Does not create IBSS itself.
	Cannot configure the following on FreeBSD:
		selection of infrastructure/adhoc mode
		ESSID
		...

Submitted by: Atsushi Onoe <onoe@sm.sony.co.jp>
2000-04-06 02:48:48 +00:00
Hellmuth Michaelis
afb8931fa8 Remove obsolete reference to PCVT_FREEBSD. 2000-04-04 13:14:43 +00:00
Mike Smith
48bb080006 Remove the !(I386 & SMP) tests; we don't run SMP on an i386 system, and
they break the LINT build.
2000-04-03 06:02:00 +00:00
Matthew Dillon
7c8fdcbd19 Make the sigprocmask() and geteuid() system calls MP SAFE. Expand
commentary for copyin/copyout to indicate that they are MP SAFE as
    well.

Reviewed by: msmith
2000-04-02 17:52:43 +00:00
Poul-Henning Kamp
c244d2de43 Move B_ERROR flag to b_ioflags and call it BIO_ERROR.
(Much of this done by script)

Move B_ORDERED flag to b_ioflags and call it BIO_ORDERED.

Move b_pblkno and b_iodone_chain to struct bio while we transition, they
will be obsoleted once bio structs chain/stack.

Add bio_queue field for struct bio aware disksort.

Address a lot of stylistic issues brought up by bde.
2000-04-02 15:24:56 +00:00
Peter Wemm
255108f385 Make sysv-style shared memory tuneable params fully runtime adjustable
via sysctl.  It's done pretty simply but it should be quite adequate.
Also move SHMMAXPGS from $machine/include/vmparam.h as the comments that
went with it were wrong... we don't allocate KVM space for the pages so
that comment is bogus..  The only practical limit is how much physical
ram you want to lock up as this stuff isn't paged out or swap backed.
2000-03-30 07:17:05 +00:00
KATO Takenori
61b64fdb1e PC-98 BIOS copies the DX register into its work area. The value of it
shows `CPUID' and it is useful to identify CPU.  So, it is copied from
BIOS work area to the cpu_id variable (PC-98 only).

Submitted by:	chi@bd.mbn.or.jp (Chiharu Shibata)
2000-03-29 13:45:40 +00:00
Matthew Dillon
bd5caafc4d The SMP cleanup commit broke need_resched, this fixes that and also
removed unncessary MPLOCKED and 'lock' prefixes from the interrupt
    nesting level, since (A) the MP lock is held at the time, and (B) since
    the neting level is restored prior to return any interrupted code
    will see a consistent value.
2000-03-29 06:15:43 +00:00
KATO Takenori
91cb959ddb Added indirect pio into the bus space stuff for the NEC PC-98. bus.h
includes one of bus_at386.h and bus_pc98.h. Becuase only bus_pc98.h
supports indirect pio and bus_at386.h is identical to old bus.h, there
is no functional change in PC-AT's kernels.  That is, it cannot cause
performance loss.

Submitted by:	nyan
Reviewed by:	imp
bde and luoqi provided useful comments for earlier version.
2000-03-29 03:15:22 +00:00
Matthew Dillon
db6a426158 The SMP cleanup commit broke UP compiles. Make UP compiles work again. 2000-03-28 18:06:49 +00:00
Matthew Dillon
36e9f877df Commit major SMP cleanups and move the BGL (big giant lock) in the
syscall path inward.  A system call may select whether it needs the MP
    lock or not (the default being that it does need it).

    A great deal of conditional SMP code for various deadended experiments
    has been removed.  'cil' and 'cml' have been removed entirely, and the
    locking around the cpl has been removed.  The conditional
    separately-locked fast-interrupt code has been removed, meaning that
    interrupts must hold the CPL now (but they pretty much had to anyway).
    Another reason for doing this is that the original separate-lock for
    interrupts just doesn't apply to the interrupt thread mechanism being
    contemplated.

    Modifications to the cpl may now ONLY occur while holding the MP
    lock.  For example, if an otherwise MP safe syscall needs to mess with
    the cpl, it must hold the MP lock for the duration and must (as usual)
    save/restore the cpl in a nested fashion.

    This is precursor work for the real meat coming later: avoiding having
    to hold the MP lock for common syscalls and I/O's and interrupt threads.
    It is expected that the spl mechanisms and new interrupt threading
    mechanisms will be able to run in tandem, allowing a slow piecemeal
    transition to occur.

    This patch should result in a moderate performance improvement due to
    the considerable amount of code that has been removed from the critical
    path, especially the simplification of the spl*() calls.  The real
    performance gains will come later.

Approved by: jkh
Reviewed by: current, bde (exception.s)
Some work taken from: luoqi's patch
2000-03-28 07:16:37 +00:00
Matthew Dillon
7c58e473f5 Commit the buffer cache cleanup patch to 4.x and 5.x. This patch fixes a
fragmentation problem due to geteblk() reserving too much space for the
    buffer and imposes a larger granularity (16K) on KVA reservations for
    the buffer cache to avoid fragmentation issues.  The buffer cache size
    calculations have been redone to simplify them (fewer defines, better
    comments, less chance of running out of KVA).

    The geteblk() fix solves a performance problem that DG was able reproduce.

    This patch does not completely fix the KVA fragmentation problems, but
    it goes a long way

Mostly Reviewed by: bde and others
Approved by: jkh
2000-03-27 21:29:33 +00:00
Dan Moschuk
6ad9d70260 Include a space between hash ('#') and 'Berkeley packet filter' like
all the other comments have.
2000-03-21 17:00:58 +00:00
Poul-Henning Kamp
91266b96c4 Isolate the Timecounter internals in their own two files.
Make the public interface more systematically named.

Remove the alternate method, it doesn't do any good, only ruins performance.

Add counters to profile the usage of the 8 access functions.

Apply the beer-ware to my code.

The weird +/- counts are caused by two repocopies behind the scenes:
	kern/kern_clock.c -> kern/kern_tc.c
	sys/time.h -> sys/timetc.h
(thanks peter!)
2000-03-20 14:09:06 +00:00
Poul-Henning Kamp
21144e3bf1 Remove B_READ, B_WRITE and B_FREEBUF and replace them with a new
field in struct buf: b_iocmd.  The b_iocmd is enforced to have
exactly one bit set.

B_WRITE was bogusly defined as zero giving rise to obvious coding
mistakes.

Also eliminate the redundant struct buf flag B_CALL, it can just
as efficiently be done by comparing b_iodone to NULL.

Should you get a panic or drop into the debugger, complaining about
"b_iocmd", don't continue.  It is likely to write on your disk
where it should have been reading.

This change is a step in the direction towards a stackable BIO capability.

A lot of this patch were machine generated (Thanks to style(9) compliance!)

Vinum users:  Greg has not had time to test this yet, be careful.
2000-03-20 10:44:49 +00:00
Martin Cracauer
cce9dd21c1 Exchange numerical values for FPE_INTDIV and FPE_INTOVF, so that they
are compatible with the older ones implemented in FreeBSD 3.x.

PR:		15488
2000-03-20 10:22:19 +00:00
Peter Wemm
4e64b0d320 Document and supply COMPAT_OLDPCI and COMPAT_OLDISA so 'make release'
still works.
2000-03-19 13:33:26 +00:00
Peter Wemm
80060e8897 Connect the ISA and PCI compatability shims to an option. In this case
it's options COMPAT_OLDISA and COMPAT_OLDPCI.  This is meant to be a
fairly strong incentive to update the older drivers to newbus, but doesn't
(quite) leave anybody hanging with no hardware support.  I was talking with
a few folks and I was encouraged to simply break or disable the shims but
that was a bit too drastic for my liking.
2000-03-19 13:07:12 +00:00
Nick Hibma
e2dbd15f2e Please welcome the URio driver. Written by
Iwasa Kazmi <kzmi\@ca2.so-net.ne.jp>
2000-03-16 09:16:14 +00:00
Poul-Henning Kamp
db5f635acc Eliminate the undocumented, experimental, non-delivering and highly
dangerous MAX_PERF option.
2000-03-16 08:51:55 +00:00
Bruce Evans
311b554beb Disabled the optimization of not doing an invltlb_1pg() when changing
pte's from zero.  The TLB is supposed to be invalidated when pte's are
changed _to_ zero, but this doesn't occur in all cases for global pages
(PG_G stops invltlb() from working, and invltlb_1pg() is not used
enough).

PR:		14141, 16568
Submitted by:	dillon
2000-03-13 14:47:46 +00:00
Poul-Henning Kamp
d8b47cbb70 Stop isadma from abusing the B_READ, B_RAW and B_WRITE flags.
Define ISADMA_{READ,WRITE,RAW} macros with the same numeric
values as the B_{READ,WRITE,RAW} and use them instead throughout.
2000-03-13 10:19:32 +00:00
Martin Cracauer
0c14a6606b Change the default FPU control word so that exceptions for new
processes are now masked until set by fpsetmask(3).

Submitted by:	bde
Approved by:	jkh, bde
2000-03-10 17:56:33 +00:00
Jonathan Lemon
5e3488e373 Add Compaq `ida' driver to GENERIC, update it's LINT entry.
Approved by:	jordan
2000-03-09 16:32:56 +00:00
Peter Dufault
6d9a8d3e8f I applied the wrong patch set. Back out anything associated
with the known bogus currtpriority.  This undoes the previous changes to
sys/i386/i386/trap.c, sys/alpha/alpha/trap.c, sys/sys/systm.h

Now we have the patch set approved by bde.

Approved by:	bde
2000-03-02 22:03:49 +00:00
Peter Dufault
383774c417 Patches that eliminate extra context switches in FIFO case.
Fixes p1003_1b regression test in the simple case of no RR and
FIFO processes competing.

Reviewed by:	jkh, bde
2000-03-02 16:20:07 +00:00
Brian S. Dean
2265d5e30d Reset the hardware debug registers when exec'ing a new image.
Reviewed by:	bde,jlemon
Approved by:	jkh
2000-02-28 19:48:51 +00:00
Brian Feldman
60bfc3b09b Do some cleanups of the IPv6 stuff. This is a non-functional change.
Approved by:	jkh
2000-02-27 07:35:42 +00:00
Jordan K. Hubbard
0dab491675 Enable IPv6 support by default. 2000-02-26 22:09:31 +00:00
Doug Rabson
ac19291f35 Add a workaround to allow us to detect the second pci bus on an HP
Netserver LS/2.

Approved by: jkh
2000-02-23 20:25:06 +00:00
Brian S. Dean
80275388cb Fix an __asm operand constraint which broke the -O3 and -O0 builds.
Submitted by:	Seigo Tanimura <tanimura@freebsd.org>
Approved by:	jkh
2000-02-21 13:06:50 +00:00
Brian S. Dean
de8050f9b8 Don't forget to reset the hardware debug registers when a process that
was using them exits.

Don't allow a user process to cause the kernel to take a TRCTRAP on a
user space address.

Reviewed by:	jlemon, sef
Approved by:	jkh
2000-02-20 20:51:23 +00:00
Nick Hibma
418a4537cf Update the documentation to reflect Bill Paul's latest changes. 2000-02-20 14:41:54 +00:00
Kazutaka YOKOTA
528b8853bb Make it clear that 'options XSERVER' is for pcvt and not for syscons.
Submitted by: Doug Barton <Doug@gorean.org>
Approved by: jkh
2000-02-16 04:27:04 +00:00
Doug Rabson
9a1498a435 Fix an uninitialised variable which affected probing on some machines.
Approved by: jkh
Reviewed by: gallatin
2000-02-13 09:49:05 +00:00
Peter Wemm
242c5536ea Clean up some loose ends in the network code, including the X.25 and ISO
#ifdefs.  Clean out unused netisr's and leftover netisr linker set gunk.
Tested on x86 and alpha, including world.

Approved by:	jkh
2000-02-13 03:32:07 +00:00
David E. O'Brien
ed0010ed09 Document the support in the kernel for hardware debug registers on the
ix86 platform which allows for hardware watchpoints, etc...

Submitted by:	Brian Dean <brdean@unx.sas.com>
2000-02-12 18:33:54 +00:00
Andrew Gallatin
da4009202a Allow allows peer pci buses which are directly connected to the RCC host pci
chipset to be probed & attached on newer Dell PowerEdge servers, such as
the 2400 and 4400.

Reviewed by: 	dfr, msmith, jlemon
Tested by:	hnokubi@yyy.or.jp (in a previous incantation)
Approved by:	jkh
2000-02-09 20:05:30 +00:00
Nick Hibma
4f2e8d6383 Add PCI Id's for i810 chipsets.
PR:		16517
Submitted by:	SAKIYAMA Nobuo <sakichan@lares.dti.ne.jp>
Approved by:	jhk
2000-02-07 12:50:33 +00:00
Jordan K. Hubbard
4a04162824 Clean up POSIX options, syncronize generics. 2000-02-04 07:02:53 +00:00
Nick Hibma
764d1fc491 da0 -> da 2000-02-01 09:32:04 +00:00
Peter Wemm
68b538c712 Remove 'conflicts' token - it has been effectively doing absolutely
nothing for quite some time.  The only thing that cared was userconfig,
but it was for one invisible device so we never saw it's effects.
2000-01-29 18:07:07 +00:00
Peter Wemm
690f85de65 Remove a bunch of unused (NO-OP) #if NFOO > 0 type includes and some
#include "foo.h" headers.
2000-01-29 16:17:36 +00:00
Peter Wemm
7b387768d7 Remove a workaround for a gas bug. It couldn't assemble a certain
lgdt instruction, but the binutils based one is fine and has been
for ages.
2000-01-29 13:51:17 +00:00
KATO Takenori
10d6e4904e Simplify messages of Pentium II, Pentium II Xeon, Celeron, Pentium III
and Pentium III Xeon CPUs.  If a CPU is one of Pentium II, Pentium II
Xeon and Celeron, the message is always "Pentium II/Pentium II
Xeon/Celeron".   If a CPU is one of Pentium III and Pentium III Xeon,
the message is always "Pentium III/Pentium III Xeon".
2000-01-29 07:49:02 +00:00
Warner Losh
173c0f9f5c Mitigate the stream.c attacks
o Drop all broadcast and multicast source addresses in tcp_input.
o Enable ICMP_BANDLIM in GENERIC.
o Change default to 200/s from 100/s.  This will still stop the attack, but
  is conservative enough to do this close to code freeze.

This is not the optimal patch for the problem, but is likely the least
intrusive patch that can be made for this.

Obtained from: Don Lewis and Matt Dillon.
Reviewed by: freebsd-security
2000-01-28 06:13:09 +00:00
Kirk McKusick
7881bb5d5f Add soft updates to the set of things being tagged. Syntax cleanup. 2000-01-27 01:22:06 +00:00
Mike Smith
a6291d5558 Correctly initialise the available IRQ numbers in the APIC_IO case.
IRQ 2 was being unilaterally disallowed, which is only appropriate if
the interrupt hardware is the traditional chained PIC arrangement.

Reviewed by:	tegge (in principle)
2000-01-26 01:32:51 +00:00
Doug Rabson
a43a8fd704 Use device_printf() instead of device_print_prettyname(). 2000-01-25 21:39:20 +00:00
Bruce Evans
be16a3aba0 Fixed the profiling version ALTENTRY(). Again. The previous version
didn't set up the frame pointer before calling mcount, and then jumped
to the wrong place in ENTRY() to defeat the point of the jump.
2000-01-25 09:01:55 +00:00
Peter Wemm
b33b19409d Remove a bunch of no-op "port ?" and "irq ?" declarations. 2000-01-24 08:49:24 +00:00
Bruce Evans
621d865f30 Removed bogus quotes and unmangled related contractions.
"ktrace(1) syscall trace" -> "ktrace(1)".
2000-01-24 05:38:55 +00:00
Peter Wemm
97608dbe74 Some formatting cleanups and remove comments about numbers of units that
were intended to head off confusion about the trailing '0'.
2000-01-23 18:30:35 +00:00
Peter Wemm
0d31b1798d Drop 'at ppbus?' and the trailing '0' from the ppbus children. 2000-01-23 14:46:20 +00:00
Peter Wemm
c9953c3b9e Update GENERIC/LINT to leave out the useless digit at the end of pci
or other unwired devices.
2000-01-23 12:18:53 +00:00
Warner Losh
f0e4bd3f99 Add the two wireless pccard nics. 2000-01-23 04:29:17 +00:00
Wilko Bulte
29429dde38 updated comments 2000-01-21 20:19:18 +00:00
Jason Evans
ed25321907 Move ENTRY and ALTENTRY definitions to asm.h where they belong.
Unbreak profiling.  Again.

Submitted by:	bde
2000-01-20 03:15:01 +00:00
Bill Fumerola
0b04a9eef3 Cast rman_get_virtual() to a vm_offset_t.
Submitted by:	msmith
2000-01-18 15:44:24 +00:00
Alfred Perlstein
28255f07ec unbreak (rv -> r), afaik what Mike intended, boots fine on my machine 2000-01-18 12:24:44 +00:00
Jordan K. Hubbard
c5954134e4 Enable POSIX P1003_1B extentions by default; there's no reason I can see
not to class them with the SYSV extentions as "optional but damn useful".

Also desired by:	wollman
2000-01-18 07:52:12 +00:00
Mike Smith
f6bf1bb672 Don't try to map memory resources into the kernel until they're actually
activated.  Some of the things that get listed as "resources" aren't
necessarily suited for this.

(This shouldn't be a problem for any driver that correctly passes
RF_ACTIVE)
2000-01-18 02:13:27 +00:00
Seigo Tanimura
25b734e7ee A processor with the CPUID of 0x?8? is Pentium III.
(aka Coppermine)

Noticed by:	Satoshi Sawada <k-sawata@gnoc2.comminet.or.jp>
Reviewd by:	Takuma Yamada <fuzzy2@st.rim.or.jp>
2000-01-15 06:29:03 +00:00
Bill Paul
261b9b3066 Add driver support for the Aironet 4500/4800 series wireless 802.11
NICs. (Finally!) The PCMCIA, ISA and PCI varieties are all supported,
though only the ISA and PCI ones will work on the alpha for now.
PCCARD, ISA and PCI attachments are all provided. Also provided an
ancontrol(8) utility for configuring the NIC, man pages, and updated
pccard.conf.sample. ISA cards are supported in both ISA PnP and hard-wired
mode, although you must configure the kernel explicitly to support the
hardwired mode since you have to know the I/O address and port ahead
of time.

Special thanks to Doug Ambrisko for doing the initial newbus hackery
and getting it to work in infrastructure mode.
2000-01-14 20:41:03 +00:00
Peter Wemm
a7c517ceaf Add back the 'at ppbus?' for the lpt etc drivers. Now it's used. 2000-01-14 08:16:28 +00:00
Bill Paul
0177987224 Add device driver support for USB ethernet adapters based on the CATC
USB-EL1202A chipset. Between this and the other two drivers, we should
have support for pretty much every USB ethernet adapter on the market.
The only other USB chip that I know of is the SMC USB97C196, and right
now I don't know of any adapters that use it (including the ones made
by SMC :/ ).

Note that the CATC chip supports a nifty feature: read and write combining.
This allows multiple ethernet packets to be transfered in a single USB
bulk in/out transaction. However I'm again having trouble with large
bulk in transfers like I did with the ADMtek chip, which leads me to
believe that our USB stack needs some work before we can really make
use of this feature. When/if things improve, I intend to revisit the
aue and cue drivers. For now, I've lost enough sanity points.
2000-01-14 03:14:49 +00:00
Matthew N. Dodd
de9cfdd736 Allow SMP systems with an MCA bus to work properly.
Reviewed by:	peter
2000-01-13 09:09:02 +00:00
Matthew N. Dodd
1f3e0d3de8 Remove the 'at isa? ...' bits for ex0.
Remove the confusing text about pccard and unit numbers for ep0.
2000-01-13 07:01:13 +00:00
David E. O'Brien
c201f69bed Sort. 2000-01-12 02:30:42 +00:00
Kazutaka YOKOTA
35e61cbd71 Add a new mechanism, cndbctl(), to tell the console driver that
ddb is entered.  Don't refer to `in_Debugger' to see if we
are in the debugger.  (The variable used to be static in Debugger()
and wasn't updated if ddb is entered via traps and panic anyway.)

- Don't refer to `in_Debugger'.
- Add `db_active' to i386/i386/db_interface.d (as in
  alpha/alpha/db_interface.c).
- Remove cnpollc() stub from ddb/db_input.c.
- Add the dbctl function to syscons, pcvt, and sio. (The function for
  pcvt and sio is noop at the moment.)

Jointly developed by: bde and me

(The final version was tweaked by me and not reviewed by bde.  Thus,
if there is any error in this commit, that is entirely of mine, not
his.)

Some changes were obtained from: NetBSD
2000-01-11 14:54:01 +00:00
Warner Losh
89ce66ed87 Uncomment pcic device and put pccard in GENERIC. PCCARD will be removed
in a little while as soon as I find all the places it is used in the
tree.
2000-01-10 02:29:23 +00:00
Bruce Evans
c83b1328f1 Fixed style bugs related to the access functions for the bsfl and bsrl
i386 instructions.
2000-01-09 16:46:03 +00:00
Peter Wemm
62d128b859 s/controller/device/ as per config(8) changes 2000-01-08 15:59:12 +00:00
Bruce Evans
c453bba744 Compile genassym.c with ordinary ${CFLAGS}. The (small) needs for
${GEN_CFLAGS} and -U_KERNEL became negative when all all the
genassym.c's were converted to be cross-built.

Makefile.*:
- Cleanups associated with the old genassym.
- Fixed deprecated spelling of ${.IMPSRC} as "$<".
2000-01-08 15:52:22 +00:00
Peter Wemm
4a1e4cb727 Clean up the cfgmech/pci_mechanism debris. The reason for the existance
of this is no longer an issue as we have a replacement driver for the
one that needed it.

Reviewed by:	dfr
2000-01-08 08:31:24 +00:00
Marcel Moolenaar
3abe5082ad Use genassym(1). The definitions of NKPDE and NKPT have been removed
because they are already defined in pmap.h, resulting in duplicate
definitions.

Reviewed by: bde
2000-01-07 11:50:46 +00:00
Luoqi Chen
5c8b298e0e Allow SMP && NCPU == 1 to work. From now on, there's no restriction on the
value of NCPU relative to the number of cpus physically present, the actual
number of cpus utilized will be the smaller of the two.
2000-01-07 08:49:25 +00:00
Bill Paul
dfd1e98eac Add device driver support for USB ethernet adapters based on the
Kawasaki LSI KL5KUSB101B chip, including the LinkSys USB10T, the
Entrega NET-USB-E45, the Peracom USB Ethernet Adapter, the 3Com
3c19250 and the ADS Technologies USB-10BT. This device is 10mbs
half-duplex only, so there's miibus or ifmedia support. This device
also requires firmware to be loaded into it, however KLSI allows
redistribution of the firmware images (I specifically asked about
this; they said it was ok).

Special thanks to Annelise Anderson for getting me in touch with
KLSI (eventually) and thanks to KLSI for providing the necessary
programming info.

Highlights:
- Add driver files to /sys/dev/usb
- update usbdevs and regenerate attendate files
- update usb_quirks.c
- Update HARDWARE.TXT and RELNOTES.TXT for i386 and alpha
- Update LINT, GENERIC and others for i386, alpha and pc98
- Add man page
- Add module
- Update sysinstall and userconfig.c
2000-01-05 04:27:24 +00:00
Tor Egge
82916a1126 ISA device drivers use the ISA source interrupt number in locations where
the low level interrupt handler number should be used.  Change
setup_apic_irq_mapping() to allocate low level interrupt handler X (Xintr${X})
for any ISA interrupt X mentioned in the MP table.

Remove an assumption in the driver for the system clock (clock.c) that
interrupts mentioned in the MP table as delivered to IOAPIC #0 intpin Y
is handled by low level interrupt handler Y (Xintr${Y}) but don't assume
that low level interrupt handler 0 (Xintr0) is used.

Don't allocate two low level interrupt handlers for the system clock.
Reviewed by:	NOKUBI Hirotaka <hnokubi@yyy.or.jp>
2000-01-04 22:24:59 +00:00
Matt Jacob
b6ca8f5a13 add wx0 driver 2000-01-04 11:17:35 +00:00
Poul-Henning Kamp
f8515dd800 Move the "sti" instruction to right before the "hlt" to close a tiny
race condition.

Obtained from:	bde and/or obrien
2000-01-02 15:18:12 +00:00
Peter Wemm
664a31e496 Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"
is an application space macro and the applications are supposed to be free
to use it as they please (but cannot).  This is consistant with the other
BSD's who made this change quite some time ago.  More commits to come.
1999-12-29 04:46:21 +00:00
Bill Paul
ed63a7aaef This commit adds device driver support for the ADMtek AN986 Pegasus
USB ethernet chip. Adapters that use this chip include the LinkSys
USB100TX. There are a few others, but I'm not certain of their
availability in the U.S. I used an ADMtek eval board for development.
Note that while the ADMtek chip is a 100Mbps device, you can't really
get 100Mbps speeds over USB. Regardless, this driver uses miibus to
allow speed and duplex mode selection as well as autonegotiation.
Building and kldloading the driver as a module is also supported.

Note that in order to make this driver work, I had to make what some
may consider an ugly hack to sys/dev/usb/usbdi.c. The usbd_transfer()
function will use tsleep() for synchronous transfers that don't complete
right away. This is a problem since there are times when we need to
do sync transfers from an interrupt context (i.e. when reading registers
from the MAC via the control endpoint), where tsleep() us a no-no.
My hack allows the driver to have the code poll for transfer completion
subject to the xfer->timeout timeout rather that calling tsleep().
This hack is controlled by a quirk entry and is only enabled for the
ADMtek device.

Now, I'm sure there are a few of you out there ready to jump on me
and suggest some other approach that doesn't involve a busy wait. The
only solution that might work is to handle the interrupts in a kernel
thread, where you may have something resembling a process context that
makes it okay to tsleep(). This is lovely, except we don't have any
mechanism like that now, and I'm not about to implement such a thing
myself since it's beyond the scope of driver development. (Translation:
I'll be damned if I know how to do it.) If FreeBSD ever aquires such
a mechanism, I'll be glad to revisit the driver to take advantage of
it. In the meantime, I settled for what I perceived to be the solution
that involved the least amount of code changes. In general, the hit
is pretty light.

Also note that my only USB test box has a UHCI controller: I haven't
I don't have a machine with an OHCI controller available.

Highlights:

- Updated usb_quirks.* to add UQ_NO_TSLEEP quirk for ADMtek part.
- Updated usbdevs and regenerated generated files
- Updated HARDWARE.TXT and RELNOTES.TXT files
- Updated sysinstall/device.c and userconfig.c
- Updated kernel configs -- device aue0 is commented out by default
- Updated /sys/conf/files
- Added new kld module directory
1999-12-28 02:01:18 +00:00
Bruce Evans
9bcde22f7a Don't include <isa/isavar.h> or compile code depending on it when isa
is not configured.  Including <isa/isavar.h> when it is not used is
harmful as well as bogus, since it includes "isa_if.h" which is not
generated when isa is not configured.
1999-12-26 16:21:19 +00:00
Bruce Evans
ffd344ddbb Replaced the INTRMASK and INTRUNMASK macros by "|" and "&~" operations.
Some interface botches went away, leaving the macros unused outside of
the implementation of interrupt masking, and it was silly for the
implementation to use the macros in only one place each.
1999-12-26 12:43:47 +00:00
Bruce Evans
265cdeddb7 Fixed breakage of read-only opening of /dev/*mem at securelevel > 0 in
previous pair of commits.

Spell the "securelevel > 0" check consistently.

Use the proc arg instead of curproc in mmopen() and mmclose().
1999-12-26 11:44:45 +00:00
Bruce Evans
0f19e631e2 Fixed races accessing the RTC. The races apparently caused
apm_default_resume() to sometimes set a very wrong time.
(1) Accesses to the RTC index and data registers were not atomic enough.
    Interrupts were not masked.  This was only good enough until an
    interrupt handler (rtcintr()) started accessing the RTC in FreeBSD-2.0.
(2) Access to the block of time registers in inittodr() was not atomic
    enough.  inittodr() has 244us to read the time registers.  Interrupts
    were not masked.  This was only good enough until something (apm)
    started calling inittodr() after boot time in FreeBSD-2.0.
The fix for (2) also makes the timecounter update more atomic, although
this is currently unimportant due to the low resolution of the RTC.

Problem reported by:	mckay
1999-12-25 15:30:31 +00:00
Bill Paul
b6219c623c Fix minor typo in comments about WaveLAN/IEEE driver: 802.1 -> 802.11 1999-12-23 05:32:53 +00:00
David E. O'Brien
19b132d78b Turn on the sym' driver by default. It lives well beside the ncr' driver
now.  On one machine with <825a> and <875> controllers, `sym' correctly
attached.  On another one with only a <ncr 53c810 fast10 scsi>, the `ncr'
driver correctly attached.
1999-12-22 05:52:04 +00:00
Eivind Eklund
4c8d1f1d99 Use the correct return value for MCA NMIs.
Reviewed by:	mdodd
1999-12-21 18:13:02 +00:00
Eivind Eklund
369dc8ceb8 Change incorrect NULLs to 0s 1999-12-21 11:14:12 +00:00
Peter Wemm
ec6e462d78 Remove references to register_intr() etc in comments. 1999-12-20 15:11:31 +00:00
Peter Wemm
c13a71596b Zap the old isa_device specific register_intr() and unregister_intr()
emulations.  Thankfully, nothing is left in the tree that uses them.
1999-12-20 15:01:23 +00:00
Bill Fumerola
65bbe4e33a Borrow phk's axe and chop off the old soundcard-CDROM devices. We get
about 40k of savings from this, and these abominations are still in LINT
if anyone needs to use them.

Reviewed by:	jkh
1999-12-19 20:33:05 +00:00
Mark Murray
70c3f04993 Comment and order to reduce diffs. No functional change. 1999-12-19 17:12:19 +00:00
Warner Losh
4e820cbe37 spell isa right on sn0 line 1999-12-18 07:49:54 +00:00
Warner Losh
22ffd22dbd Driver for the smc91xx series of ethernet chips. Ported from PAO to
3.3R and then to -current.  The pccard support has been left in the
driver, but is presently non-functional because we are using the
isa_compat layer for the moment.

Obtained From: PAO
Sponsored by: Timing Solutions
1999-12-18 06:11:22 +00:00
Peter Wemm
7ba4a77549 Reclaim UPAGES_HOLE (8k) that was chopped out of process address space.
The UPAGES have not been there since Jan '96, but the hole was preserved
for BSD/OS binary compatability.  This has been fixed other ways (%ebx
now has a pointer to PS_STRINGS), and the stack is nowhere near where
it used to be so this hack isn't required anymore.
1999-12-11 10:54:06 +00:00
Poul-Henning Kamp
5fe1db5b0a Remove the if_ze and if_zp drivers.
These drivers were cloned from the ed and ep drivers back in 1994
when PCMCIA cards were a very new thing and we had no other support
for such devices.  They treated the PCIC (the chip which controls the
PCCARD slot) as part of their device and generally hacked their way
to success.  They have significantly bit-rotted relative to their
ancestor drivers (ed & ep) and they were a dead-end on the evolution
path to proper PCCARD support in FreeBSD.

They have been terminally broken since August 18 where mdodd forgot
them and nobody seems to have missed them enough to fix them since.

I found no outstanding PRs against these drivers.
1999-12-10 10:45:11 +00:00
Søren Schmidt
a3fb836cb5 Finally use the new ata driver. 1999-12-08 09:19:37 +00:00
Peter Wemm
9e03cab563 Fold the pnp code into the base isa system to pave the way for PNPBIOS.
Reviewed by:	dfr (a few weeks ago)
1999-12-06 18:17:42 +00:00
Luoqi Chen
ef460ae979 Need header <machine/smp.h> for prototype declaration of smp_rendezvous()
in my previous commit.
1999-12-06 05:12:26 +00:00
Luoqi Chen
91c28bfde0 User ldt sharing. 1999-12-06 04:53:08 +00:00
Doug Rabson
c954d7368a Don't use a bogus bus number for Ross host-pci bridges.
PR:	kern/15278
Submitted by: Ahmed Benani <ahmed_benani@urbanet.ch>
1999-12-05 18:41:34 +00:00
Luoqi Chen
ee46a57116 Reinstate the aic driver.
PR:		conf/15187
1999-12-05 01:56:42 +00:00
Bill Paul
96f2e892a7 Add the if_dc driver and remove all of the al, ax, dm, pn and mx drivers
which it replaces. The new driver supports all of the chips supported
by the ones it replaces, as well as many DEC/Intel 21143 10/100 cards.

This also completes my quest to convert things to miibus and add
Alpha support.
1999-12-04 17:41:31 +00:00
KATO Takenori
aa4df56dc6 The address 0x472 is used for the SCSI HDD geometry information on
PC-98.  Therefore, the PC-98 kernel should not modify it.
1999-12-04 13:09:26 +00:00
Marcel Moolenaar
204fed67d2 oszsigcode -> szosigcode
Pointed out by: bde
1999-12-04 10:53:39 +00:00
Marcel Moolenaar
ec1d9fe8ff Fix type of sf_addr.
Pointed out by: bde
1999-12-04 10:40:24 +00:00
Matthew N. Dodd
fe0d408987 Remove the 'ivars' arguement to device_add_child() and
device_add_child_ordered().  'ivars' may now be set using the
device_set_ivars() function.

This makes it easier for us to change how arbitrary data structures are
associated with a device_t.  Eventually we won't be modifying device_t
to add additional pointers for ivars, softc data etc.

Despite my best efforts I've probably forgotten something so let me know
if this breaks anything.  I've been running with this change for months
and its been quite involved actually isolating all the changes from
the rest of the local changes in my tree.

Reviewed by:	peter, dfr
1999-12-03 08:41:24 +00:00