Commit Graph

336 Commits

Author SHA1 Message Date
David E. O'Brien
00910f2882 ELF kernels should use an ELF sysvec. This allows us to move a.out
specific files to those platforms that acutally support a.out.
2000-11-05 10:41:35 +00:00
John Baldwin
36412d79b4 - Make the mutex code almost completely machine independent. This greatly
reducues the maintenance load for the mutex code.  The only MD portions
  of the mutex code are in machine/mutex.h now, which include the assembly
  macros for handling mutexes as well as optionally overriding the mutex
  micro-operations.  For example, we use optimized micro-ops on the x86
  platform #ifndef I386_CPU.
- Change the behavior of the SMP_DEBUG kernel option.  In the new code,
  mtx_assert() only depends on INVARIANTS, allowing other kernel developers
  to have working mutex assertiions without having to include all of the
  mutex debugging code.  The SMP_DEBUG kernel option has been renamed to
  MUTEX_DEBUG and now just controls extra mutex debugging code.
- Abolish the ugly mtx_f hack.  Instead, we dynamically allocate
  seperate mtx_debug structures on the fly in mtx_init, except for mutexes
  that are initiated very early in the boot process.   These mutexes
  are declared using a special MUTEX_DECLARE() macro, and use a new
  flag MTX_COLD when calling mtx_init.  This is still somewhat hackish,
  but it is less evil than the mtx_f filler struct, and the mtx struct is
  now the same size with and without mutex debugging code.
- Add some micro-micro-operation macros for doing the actual atomic
  operations on the mutex mtx_lock field to make it easier for other archs
  to override/optimize mutex ops if needed.  These new tiny ops also clean
  up the code in some places by replacing long atomic operation function
  calls that spanned 2-3 lines with a short 1-line macro call.
- Don't call mi_switch() from mtx_enter_hard() when we block while trying
  to obtain a sleep mutex.  Calling mi_switch() would bogusly release
  Giant before switching to the next process.  Instead, inline most of the
  code from mi_switch() in the mtx_enter_hard() function.  Note that when
  we finally kill Giant we can back this out and go back to calling
  mi_switch().
2000-10-20 07:26:37 +00:00
Hellmuth Michaelis
925be47cdb update to i4b version 0.95.04 2000-10-09 13:41:07 +00:00
Peter Wemm
a6bc3edb3b Move the ata/atapi files to the common area. They were the same on all
platforms.

While here, work around a strange quirk in config(8) that I do not yet
understand.  Rearrange which atapi* files have 'optional' vs. 'count'
so that you can have atapifd without atapicd.  The only difference should
be that this works instead of having a link error because atapi-all.o got
left out of the kernel.
2000-10-03 09:23:49 +00:00
Mike Smith
12a02d6efd Move the i386 PCI attachment code out of i386/isa back into i386/pci.
Split out the configuration space access primitives, as these are needed
elsewhere as well.
2000-10-02 07:11:13 +00:00
Peter Wemm
2da5dbec3e Put on my nuclear-grade asbestos suit and cvs rm the old, broken, sound
drivers (again).  These drivers have not compiled for 5-6 months.
Now that the new sound code supports MIDI, the major reason we had for
reviving it is gone.  It is a far better investment polishing the new
midi code than trying to keep this on life support.  Come 5.0-REL, if
there are major shortcomings in the pcm sound driver then maybe we can
rethink this, but until then we should focus on pcm.

Remember, these have not been compilable since ~April-May this year.
2000-10-02 03:13:50 +00:00
David E. O'Brien
f59f3733e1 The `ed' NIC driver has been changed to work on Alpha now. So enable it
on all platforms.

Submitted by:	Alexander Langer <alex@big.endian.de>
2000-09-30 18:23:32 +00:00
Mitsuru IWASAKI
2bfb7205bf Add Timer device driver for power management events.
The code for suspend/resume is derived from APM device driver.

Some people suggested the original code is somewhat buggy, but I'd
like to just move it from apm.c without any major changes for the
initial version.  This code should be refined later.

To use pmtimer to adjust time at resume time, add
	device	pmtimer
in your kernel config file, and add
	hint.pmtimer.0.at="isa"
in your device.hints

Reviewed by:	-current, bde
2000-09-14 22:34:57 +00:00
Yoshihiro Takahashi
b14d7dac8a - Newbus'ify and bus_space'ify.
- Separate bus dependent part and independent part.
- Moved source files to sys/dev/fe (repo copied).
- Fixed some comments by chi@bd.mbn.or.jp (Chiharu Shibata)

Tested by:	bsd-nomads@clave.gr.jp and
		FreeBSD98-testers@jp.freebsd.org
2000-09-14 12:02:07 +00:00
Jason Evans
0384fff8c5 Major update to the way synchronization is done in the kernel. Highlights
include:

* Mutual exclusion is used instead of spl*().  See mutex(9).  (Note: The
  alpha port is still in transition and currently uses both.)

* Per-CPU idle processes.

* Interrupts are run in their own separate kernel threads and can be
  preempted (i386 only).

Partially contributed by:	BSDi (BSD/OS)
Submissions by (at least):	cp, dfr, dillon, grog, jake, jhb, sheldonh
2000-09-07 01:33:02 +00:00
Poul-Henning Kamp
339b49058a Move svr4 here as well... 2000-09-02 12:43:43 +00:00
Takanori Watanabe
b1f12b6157 Merge rest piece of ACPI driver.To activate acpi driver ,add
device acpi

line. Merge finished. But still experimental phase.Need more hack!

Obtained from:ACPI for FreeBSD project
2000-08-31 15:34:54 +00:00
Marcel Moolenaar
0ec24f5a8a Connect the new sources in /sys/compat/linux and the new file
in /sys/i386/linux.
2000-08-22 06:02:01 +00:00
Marcel Moolenaar
e19f2fdaad Style fixes:
o  Put the backslash in a fixed column by preference,
o  Sort the list of files.
2000-08-22 05:01:08 +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
Seigo Tanimura
1f82d2d70d 1. Update Comtrol RocketPort driver(rp) to version 3.02.
2. Newbusify the driver.
3. Build as a module.

4. Use correct minor numbers when creating device files.
5. Correctly lock control characters.
6. Return ENXIO when device not configured.
Submitted by:	Tor Egge	<Tor.Egge@fast.no>

7. Fix the baud_table.
Submitted by:	Elliot Dierksen	<ebd@oau.org>

Note:
- the old driver still lives in src/sys/i386/isa, so that you can
  revert to it if something goes wrong.
- The module does not detach very well. Attaching works fine.
2000-06-11 06:43:16 +00:00
Peter Wemm
3f664fc689 A checkpoint of a part of a work-in-progress. Some more cleanups for
config(8).  This commit allows control of the creation of the
#include "foo.h" files.  We now only create them explicitly when needed.
BTW; these are mostly bad because they usually imply static limits on
numbers of units for devices.  eg: struct mysoftc sc[NFOO];
These static limits have Got To Go.
2000-06-10 22:13:40 +00:00
Bruce Evans
f47f0edde4 Use "nm | awk ..." instead of genassym(1) to generate symbol value headers.
Symbol values are now represented using array sizes (4 arrays per symbol
so that 16-bit machines can represent 64-bit values) instead of being raw
binary values.

Reviewed by:	marcel
2000-06-02 09:27:48 +00:00
Paul Richards
ca9f504536 Build lnc driver from /sys/dev from now on. 2000-05-14 18:24:41 +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
4b00895121 Newbusify adv driver.
Reviewed by:	imp
2000-04-07 11:32:42 +00:00
Warner Losh
5664bf9cea NewBus the cs driver.
Submitted by: max@rsu.ru
2000-03-30 05:16:16 +00:00
Yoshihiro Takahashi
239fe111cd - Added PC-98 Cbus frontend.
- Move dev/aic/aic_isa.c entry from conf/files to conf/files.MACHINE
   because PC-98 uses different file.

Submitted by:	nyan and IMAI Takeshi <take-i@ceres.dti.ne.jp>
2000-03-29 14:32:34 +00:00
Bruce Evans
822dcb81d0 Fixed most disordering (all except for targets with complicated rules). 2000-03-23 19:03:26 +00:00
Bruce Evans
0784615675 Fixed clean rule for font.h. 2000-03-23 15:42:24 +00:00
Peter Wemm
a063b13d98 Tag a warning on the isa compat shims at config time. 2000-03-20 04:47:40 +00:00
Brian Feldman
a3f7c5d143 Enable the K6-2 MTRR driver again, since there are reports of it working
with the applied change.

Submitted by:	 Coleman Kane <cokane@one.net>
2000-03-19 19:22:24 +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
Jeroen Ruigrok van der Werven
b2381471b9 Remove the wd driver from the i386 kernel options. 2000-03-14 13:18:14 +00:00
Gary Jennejohn
4f9d49f140 Newbus-ify the USR Sportster TA Intern driver.
Enable the driver in sys/conf/files.i386.

In isa/isavar.h increase ISA_NPORT from 32 to 50. This is required
because this brain-damaged card maps 49 (!) port ranges. This does
not have a negative impact because this value only specifies the maximum
number of entries in a linked list and not the size of an array which
is allocated in all drivers.

The register/fifo access routines were not newbus-ified because
1) I knew that the old code worked and is simpler and more efficient
2) the if_ed driver does something similar and
3) the newbus macros collapse to inb/outb anyway.

Reviewed and tested by:	hm
Approved by:	jkh
2000-02-21 02:10:10 +00:00
Bill Fumerola
ce0c0d9da9 kbdcontrol isn't in everyones path(read: non-root people), so specify
an absolute path for us mere mortals.

Approved by:	jkh
2000-02-10 01:42:04 +00:00
Peter Wemm
5d021a76f2 Move the (duplicated exactly!) portable ISA pcm drivers to files and
tighten up the logic a little.
2000-01-29 17:15:03 +00:00
Peter Wemm
db8ba2ef83 Don't build the wdc atapi attachments unless wdc is also present. 2000-01-29 15:58:30 +00:00
Peter Wemm
08922a1c23 Arrange for the following files to be compiled when the configuration
conditions are met rather than having to resort to #if's in the code.
> dev/syscons/scvgarndr.c               optional        sc vga
> dev/syscons/scvesactl.c               optional        sc vga vesa
> i386/isa/vesa.c                       optional        vga vesa
2000-01-29 15:04:33 +00:00
Doug Rabson
9c26dc2b43 Get the ppc driver from sys/isa instead of sys/i386/isa. 2000-01-25 22:25:52 +00:00
Peter Wemm
d224cddc38 Copy i386/isa/atapi-cd.[ch] to a new name so that it doesn't have the
same object file (atapi-cd.o) as the ata drivers. I'd have called it
wcd.[ch], but there's already one of those in the Attic that we can't
clobber - the good names are taken.
Fix building so that it can be compiled into LINT alongside ata.

Requested by:	bde
2000-01-24 17:16:03 +00:00
Peter Wemm
623c24674d Activate the newbusified version of si. 2000-01-24 08:12:40 +00:00
Peter Wemm
71d38539b4 Add a warning for the snd drivers and a pointer to pcm/sbc/etc. 2000-01-18 08:31:40 +00:00
Kazutaka YOKOTA
2b944ee2b9 This is the 3rd stage of syscons code reorganization.
- Split terminal emulation code from the main part of the driver so
that we can have alternative terminal emulator modules if we like in
the future.  (We are not quite there yet, though.)

- Put sysmouse related code in a separate file, thus, simplifying the
main part of the driver.

As some files are added to the source tree, you need to run config(8)
before you compile a new kernel next time.

You shouldn't see any functional change by this commit; this is only
internal code reorganization.
2000-01-15 15:25:43 +00:00
Peter Wemm
c5191a983c Pre 4.0 tidy up.
Collect together the components of several drivers and export eisa from
the i386-only area (It's not, it's on some alphas too).  The code hasn't
been updated to work on the Alpha yet, but that can come later.

Repository copies were done a while ago.
Moving these now keeps them in consistant place across the 4.x series
as the newbusification progresses.

Submitted by:   mdodd
2000-01-14 07:14:17 +00:00
Warner Losh
90bba6bf72 Move xe driver from dev/pccard to dev/xe. Convert driver to newbus.
Driver is not functional yet, but does compile.  Tests with xe cards
indicates that it doesn't panic the machine when they are present, but
fail to probe.  Interface help in the pcic/pccard layers are needed to
complete this driver.
2000-01-10 08:05:53 +00:00
Bruce Evans
68b683dc58 Compile *_genassym.c with ordinary ${CFLAGS}. The (small) needs for
-U_KERNEL became negative when all all the genassym.c's were converted
to be cross-built.  Related cleanups: PARAM went away, but was still
used here; KERNEL was renamed to _KERNEL, but was still KERNEL here;
the deprecated macros $@ and $< were still used here.

Use "genassym ... > ${.TARGET}", not "genassym -o $@ ...", so that
genassym(1) doesn't need to support -o.

Removed half-baked hard-coded dependencies of *_genassym.o on headers.
These objects should be added to the list of objects in the depend
rule to get full dependencies.  This doesn't happen automatically
because they are not linked into the kernel.  Half baked dependencies
don't really help.
2000-01-09 08:24:27 +00:00
Bruce Evans
cfb95261b1 Quick fix for LINT breakage. KERNFORMAT went away, so don't use it
for trlld.o.
2000-01-09 07:50:42 +00:00
Marcel Moolenaar
a9d61af021 Update config rules for making {linux|svr4}_assym.h
Assembler symbols are now made using genassym(1).
1999-12-23 21:52:17 +00:00
Peter Wemm
5a81d0a50b Only compile gusc for isa (the #if NISA inside gusc effectively covers
the whole file)
1999-12-21 13:53:49 +00:00
Hellmuth Michaelis
0d5539074f update to isdn4bsd beta release 0.90: add ELSA PCC-16 isic support file 1999-12-15 13:27:12 +00:00
Hellmuth Michaelis
e5981bd1fd update to isdn4bsd beta release 0.90
drivers which are likely to be ported to newbus are commented out for now
1999-12-14 20:52:41 +00:00
Kazutaka YOKOTA
83c5d22d61 - Pull in kbd.c when sc or vt is included in the kernel, even if
no keyboard driver is defined in the kernel config file.
1999-12-13 13:01:00 +00:00
Peter Wemm
bfc8775abb Turn on warnings for the wd* driver with a loud pointer to ata*. This
doesn't break builds, but is difficult to miss..
1999-12-12 14:31:40 +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