Commit Graph

4150 Commits

Author SHA1 Message Date
Maksim Yevmenkin
6e81ac21f3 Add vkdb(4) man page and connect vkbd(4) to the build. 2004-11-16 17:19:04 +00:00
Poul-Henning Kamp
492871f585 Order of arguments after "optional" is not without significance:
the first field must be the name of the enabling device/option,
otherwise config doesn't know there is an option/device of that
name.
2004-11-15 07:48:22 +00:00
Warner Losh
c2aed5122b After discussions with Nate, repo copy the acpi assist drivers from
i386 to dev/acpi_support.  In theory, these devices could be found
other than in i386 machines only as amd64 becomes more popular.  These
drivers don't appear to do anything i386 specific, so move them to
dev/acpi_support.  Move config lines to files so that those
architectures that don't support kernel modules can build them into
the kernel.  At the same time, rename acpi_snc to acpi_sony to follow
the lead of all the other specialty devices.
2004-11-15 05:54:15 +00:00
Warner Losh
10695f3acb Use PORTSDIR, falling back to /usr/ports 2004-11-14 00:22:18 +00:00
Ruslan Ermilov
7e25cd95ff Ports aren't generally ready for parallel make.
Pointed by:	Ben Mesander
2004-11-12 20:44:51 +00:00
Peter Wemm
b7c3f3a9d5 Catch a few more autofs references.
Submitted by:  obrien
2004-11-12 19:44:30 +00:00
Warner Losh
8280421a43 Doh! This one crept in two commits ago and didn't get weeded out on
the last commit.  Sorry gang.

Conical Hat: imp
2004-11-12 04:48:24 +00:00
Warner Losh
1fd4bb62ef PORTS_MODULES: a list of ports to build with this kernel.
# I directly use the targets for building this, but it was suggested
# to use portupgrade.  I couldn't fit that into the target model, so I
# punted.
2004-11-11 23:58:14 +00:00
Warner Losh
53f8cdd88e Kill the 802.11 crypo changes that shouldn't have been committed.
Noticed by: phillip@
2004-11-11 23:30:03 +00:00
Warner Losh
dbacb6c44d Commit takawata-san's Sony Notebook Controller driver, integrated into
the tree.  Small tweaks were made by myself to eliminate unnecessary
includes and some other minor issues.  Last time I asked takawata-san
about this driver, he suggested I commit it.

Submitted by: takawata
2004-11-11 22:54:58 +00:00
Warner Losh
c8c8f27a5d pbio has moved to dev/pbio
Prodded by: peter
2004-11-11 04:53:46 +00:00
Olivier Houchard
c6cc6da44f Add a new option, ARM32_NEW_VM_LAYOUT. When set, we try to put up to 4
L2 tables in one page, instead of the old 1 L2 table <=> 1 page behavior.
While I'm there, add ARM9_CACHE_WRITE_THROUGH, which I forgot last time.
2004-11-10 22:08:27 +00:00
Mark Murray
c9472fb2c6 Remove at request of author, perhaps to be re-added later. 2004-11-10 19:54:18 +00:00
Tom Rhodes
acad338196 Fix paths after repocopies done by scottl
Reviewed by:	marius
OK'ed by:	scottl
2004-11-10 14:09:52 +00:00
Poul-Henning Kamp
f12ea43d02 Remove the obsolete gx driver.
All the hardware is supported by the better maintained if_em driver.

Absentmindedly nodded vertical by:	people on #that_channel
2004-11-08 19:05:22 +00:00
Andre Oppermann
32672ba88d Reduce annoying SCSI probing delay from 15 to 5 seconds in all GENRIC kernels.
Discussed on:	-current
2004-11-02 20:57:20 +00:00
Poul-Henning Kamp
4d13ab3da2 Add GEOM class "VFS" for filesystems and other buffer cache users
of GEOM devices.

There is nothing magic about this, it just gives a bufobj interface
to GEOM.
2004-10-29 09:56:56 +00:00
Robert Watson
df970488b3 Move the 'debug' sysctl tree under options SYSCTL_DEBUG. It generates
an inordinate amount of synchronous console output that is fairly
undesirable on slower serial console.  It's easily hit by accident
when frobbing other sysctls late at night.
2004-10-27 19:26:01 +00:00
Dag-Erling Smørgrav
995356dc10 Uncomment DIRECTIO and NSWBUF_MIN. They are both positive options (i.e.
they enable rather than disable code), so they should be on in LINT.
2004-10-26 12:20:57 +00:00
Andre Oppermann
84bb6a2e75 IPDIVERT is a module now and tell the other parts of the kernel about it.
IPDIVERT depends on IPFIREWALL being loaded or compiled into the kernel.
2004-10-25 20:02:34 +00:00
David E. O'Brien
2ee4b70bec Don the teflon coated jacket and use the same -O2 optimization options on
the 'i386' kernel that we do all our 64-bit kernels.
2004-10-25 18:24:39 +00:00
Pyun YongHyeon
7a7386a3e2 Device driver for onboard CS4231 audio controller which is found
on UltraSPARC workstations. The driver is based on OpenBSD's SBus
cs4231 driver and heavily modified to incorporate into sound(4)
infrastructure. Due to the lack of APCDMA documentation, the DMA
code of SBus cs4231 came from OpenBSD's driver.
The driver runs without Giant lock and supports both SBus and EBus
based CS4231 audio controller. Special thanks to marius for providing
feedbacks during the driver writing. His feedback made it possible
to write hiccup free playback code under high system loads.

Approved by:	jake (mentor)
Reviewed by:	marius (initial version)
Tested by:	marius, kwm, Julian C. Dunn(jdunn AT opentrend DOT net)
2004-10-25 10:29:57 +00:00
Ruslan Ermilov
a35d88931c For variables that are only checked with defined(), don't provide
any fake value.
2004-10-24 15:33:08 +00:00
Scott Long
085f35d6f3 Hook the hptmv driver up to the build. 2004-10-24 08:53:40 +00:00
Ruslan Ermilov
743d0f6640 Hack around a problem with sys/tools/usbdevs2h.awk that generates
both usbdevs.h and usbdevs_data.h.  (The latter was not cleaned.)
2004-10-24 08:26:48 +00:00
Poul-Henning Kamp
ff7c5a4880 Alas, poor SPECFS! -- I knew him, Horatio; A filesystem of infinite
jest, of most excellent fancy: he hath taught me lessons a thousand
times; and now, how abhorred in my imagination it is! my gorge rises
at it.  Here were those hacks that I have curs'd I know not how
oft.  Where be your kludges now? your workarounds? your layering
violations, that were wont to set the table on a roar?

Move the skeleton of specfs into devfs where it now belongs and
bury the rest.
2004-10-22 09:59:37 +00:00
Hidetoshi Shimokawa
fdebdf10bc Add dcons_os.{c,h}. 2004-10-13 05:41:09 +00:00
Ruslan Ermilov
f49f4f366b Back out cumulative changes from revs. 1.92-1.94: "make depend"
followed by "make depend" shouldn't do anything.  It doesn't
seem to be a problem anymore, and if someone finds it to break
again, please contact me so we can work on a real fix.

Reviewed by:	bde
2004-10-12 15:08:24 +00:00
Ruslan Ermilov
1f0896165b Style fixes, including:
- Sort kmod.mk knobs in the documentation section.
- Fixed misuses of the word "KLD" which stands for
  "kernel ld", or "kernel linker", where kernel
  module is meant.
- Removed redundant uses of ${.OBJDIR}.
- Whitespace and indentation fixes.
- CLEANFILES cleanup.
- Target redefinition protection (install.debug).

Submitted by:	bde, ru
Reviewed by:	ru, bde
2004-10-12 15:04:10 +00:00
Joerg Wunsch
31e81ae45d Revert the change from rev 1.168. ru convinced me that the situation
that was fixed by this should not normally happen, and since I did not
record the traces of my failed build attempt that had been solved with
that change, it's not entirely clear whether it hadn't been a pilot
error on my end.  In dubio pro reo. :-)
2004-10-11 21:23:56 +00:00
Joerg Wunsch
4e8ba8de26 Forcibly create symlinked headers, otherwise the build process may fail
if the target link already existed (e. g. -DNO_KERNELCLEAN).
2004-10-09 13:51:28 +00:00
Pyun YongHyeon
e60fc88fa6 Port NetBSD auxio driver. The driver was modified to use led(4) and can
be used to announce various system activity.
The auxio device provides auxiliary I/O functions and is found on various
SBus/EBus UltraSPARC models. At present, only front panel LED is
controlled by this driver.

Approved by:    jake (mentor)
Reviewed by:    joerg
Tested by:      joerg
2004-10-09 07:31:03 +00:00
Brooks Davis
ab67442f0c Since net/net_osdep.c contained only one function that could be
trivially implemented as a macro, do that and remove it.  NetBSD did
this quite a while ago.
2004-10-08 00:24:30 +00:00
Ken Smith
de4447e1c0 Back out v1.58... We still don't know what is causing the specific
problem I had but it's happening in code that is messing around with
register windows - I'm willing to live with that piece being sensitive
to this and it looks like the other problems we had reported lately
are not fixed by using -O instead of -O2.

Sorry for the churn.  Looks like I need a second pointy hat.  Someone
tells me they stack well.  :-))))
2004-10-07 20:36:56 +00:00
Warner Losh
bacb482d94 Port pbio to HEAD.
OK'd by: dds
2004-10-07 16:21:03 +00:00
Ken Smith
e47bf36158 Back out v1.49. Recent findings suggest sparc64 may not be ready for
-O2 on kernel compiles after all.  While working on adding a KASSERT
to sparc64/sparc64/rwindow.c I found that it was "position sensitive",
putting it above a call to flushw() instead of below caused corruption
of processes on the system.  jake and jhb have both confirmed there is
no obvious explanation for that.  The exact same kernel code does not
have the process corruption problem if compiled with -O instead of -O2.
There have been signs of similar issues floated on the sparc64@ mailing
list, lets see if this helps make them go away.

Note this isn't an optimal fix as far as the file format goes, if this
disgusts too many people I'll fix it the right way.  Since compiling
with something other than -O is a known problem this format would prevent
a change to the default causing grief.  And this may also help motivate
finding out what the compiler is doing wrong so we can shift back to
using -O2. :-)

My turn for the pointy hat...  One of the florescent ones...

MFC after:	2 days
2004-10-06 19:55:14 +00:00
Yaroslav Tykhiy
fc67901f36 Add a more verbose description for `device vlan'
to the above comment block devoted to such descriptions.
2004-10-04 14:16:17 +00:00
Yaroslav Tykhiy
1270082c84 Hint a kernel builder that vlan needs miibus, which isn't obvious. 2004-10-04 14:06:01 +00:00
Warner Losh
000d5e07e0 assign 187 to ata over ethernet for Sam's ata over ethernet driver.
# Yes, this is the right thing to do: we keep assignments for 4.x here
# to document them, and Sam has a nearly completed driver.
2004-10-01 06:04:24 +00:00
Poul-Henning Kamp
f6bde1fd05 Add a new API for allocating unit number (-like) resources.
Allocation is always lowest free unit number.

A mixed range/bitmap strategy for maximum memory efficiency.  In
the typical case where no unit numbers are freed total memory usage
is 56 bytes on i386.

malloc is called M_WAITOK but no locking is provided (yet).  A bit of
experience will be necessary to determine the best strategy.  Hopefully
a "caller provides locking" strategy can be maintained, but that may
require use of M_NOWAIT allocation and failure handling.

A userland test driver is included.
2004-09-30 07:04:03 +00:00
Mark Murray
932fc0bcb3 Be consistant; make the memrange bit be part of the mem module like
i386.
2004-09-28 07:29:54 +00:00
Marcel Moolenaar
03bfdd1362 Move the IA-32 trap handling from trap() to ia32_trap(). Move the
ia32_syscall() function along with it to ia32_trap.c. When COMPAT_IA32
is not defined, we'll raise SIGEMT instead.
2004-09-25 04:27:44 +00:00
Peter Wemm
2169193596 Converge towards i386. I originally resisted creating <machine/pc/bios.h>
because it was mostly irrelevant - except for the silly BIOS_PADDRTOVADDR
etc macros.  Along the way of working around this, I missed a few things.

* Make syscons properly inherit the bios capslock/shiftlock/etc state like
  i386 does.  Note that we cannot inherit the bios key repeat rate because
  that requires a bios call (which is impossible for us).
* Give syscons the ability to beep on amd64.  Oops.

While here, make bios.c compile and add it to files.amd64.
2004-09-24 01:08:34 +00:00
Olivier Houchard
107d4bd621 Use -O2 for the arm kernel as well 2004-09-23 22:53:22 +00:00
Olivier Houchard
c60e48e2b6 Use the address provided in the conf file, instead of hardcode 0xc0000000. 2004-09-23 22:52:55 +00:00
Olivier Houchard
c2f29b3e64 Add new options :
PHYSADDR : Address of the physical memory
KERNPHYSADDR : Physical address where the kernel starts
KERNVIRTADDR : Virtual address of the kernel
STARTUP_PAGETABLE_ADDR : Where to put the page table at bootstrap
+ Xscale specific options
2004-09-23 22:52:25 +00:00
Olivier Houchard
332d16a165 Add the possibility to specify the kernel virtual address and the kernel
physical address in the kernel config file, as it varies from CPU to CPU.
2004-09-23 22:47:57 +00:00
Poul-Henning Kamp
08d0c00b91 Per recent HEADSUP: Disconnect (old)vinum from the kernel build.
Users should move to the new geom_vinum implementation instead.

The refcount logic which is being added to devices to enable safe module
unloading and the buf/vm work also in progress would require a major rework
of the (old)-vinum code to comply with the new semantics.

The actual source files will not be removed until I have coordinated with
the geomvinum people if they need any bits repo-copied etc.
2004-09-23 08:34:50 +00:00
Ruslan Ermilov
e8f7141ed8 Pass the idea of the make(1) binary to use down to newvers.sh.
This is necessary so source upgrades use the correct binary.

MFC after:	3 days

For the record: Problem spotted by Scott Long, who mentioned
that source upgrades from 4.7 to recent 5.x and 6.0 are broken.
Detailed analysis shows that 4.7 has a broken make(1) binary.
A breakage was fixed in RELENG_4 in make/main.c,v 1.35.2.7 by
imp@, though the commit log erroneously stated "MFC 1.68"
while in fact it should have been spelled as "MFC 1.67".
2004-09-17 09:17:33 +00:00
Gleb Smirnoff
cec50dea12 Attach ng_netflow to kernel build.
Approved by:	julian (mentor)
2004-09-16 20:35:28 +00:00
Ceri Davies
8c5923d931 Typo fix. 2004-09-12 12:13:29 +00:00
Bill Paul
a07bd003bf Add device driver support for the VIA Networking Technologies
VT6122 gigabit ethernet chip and integrated 10/100/1000 copper PHY.
The vge driver has been added to GENERIC for i386, pc98 and amd64,
but not to sparc or ia64 since I don't have the ability to test
it there. The vge(4) driver supports VLANs, checksum offload and
jumbo frames.

Also added the lge(4) and nge(4) drivers to GENERIC for i386 and
pc98 since I was in the neighborhood. There's no reason to leave them
out anymore.
2004-09-10 20:57:46 +00:00
Ruslan Ermilov
673974d9ee Fixed sound-related hints. (Yes, this is ambiguous but matches reality.)
Reviewed by:	matk, cg (an earlier version)
MT5 after:	3 days
2004-09-08 08:42:36 +00:00
Dag-Erling Smørgrav
8985c52bb6 Device driver for the Cypress CY7C637xx and CY7C640/1xx families of USB
to RS232 bridges, such as the one found in the DeLorme Earthmate USB GPS
receiver (which is the only device currently supported by this driver).

While other USB to serial drivers in the tree rely heavily on ucom, this
one is self-contained.  The reason for that is that ucom assumes that
the bridge uses bulk pipes for I/O, while the Cypress parts actually
register as human interface devices and use HID reports for configuration
and I/O.

The driver is not entirely complete: there is no support yet for flow
control, and output doesn't seem to work, though I don't know if that is
because of a bug in the code, or simply because the Earthmate is a read-
only device.
2004-09-05 09:43:47 +00:00
Julian Elischer
ed062c8d66 Refactor a bunch of scheduler code to give basically the same behaviour
but with slightly cleaned up interfaces.

The KSE structure has become the same as the "per thread scheduler
private data" structure. In order to not make the diffs too great
one is #defined as the other at this time.

The KSE (or td_sched) structure is  now allocated per thread and has no
allocation code of its own.

Concurrency for a KSEGRP is now kept track of via a simple pair of counters
rather than using KSE structures as tokens.

Since the KSE structure is different in each scheduler, kern_switch.c
is now included at the end of each scheduler. Nothing outside the
scheduler knows the contents of the KSE (aka td_sched) structure.

The fields in the ksegrp structure that are to do with the scheduler's
queueing mechanisms are now moved to the kg_sched structure.
(per ksegrp scheduler private data structure). In other words how the
scheduler queues and keeps track of threads is no-one's business except
the scheduler's. This should allow people to write experimental
schedulers with completely different internal structuring.

A scheduler call sched_set_concurrency(kg, N) has been added that
notifies teh scheduler that no more than N threads from that ksegrp
should be allowed to be on concurrently scheduled. This is also
used to enforce 'fainess' at this time so that a ksegrp with
10000 threads can not swamp a the run queue and force out a process
with 1 thread, since the current code will not set the concurrency above
NCPU, and both schedulers will not allow more than that many
onto the system run queue at a time. Each scheduler should eventualy develop
their own methods to do this now that they are effectively separated.

Rejig libthr's kernel interface to follow the same code paths as
linkse for scope system threads. This has slightly hurt libthr's performance
but I will work to recover as much of it as I can.

Thread exit code has been cleaned up greatly.
exit and exec code now transitions a process back to
'standard non-threaded mode' before taking the next step.
Reviewed by:	scottl, peter
MFC after:	1 week
2004-09-05 02:09:54 +00:00
Ruslan Ermilov
46e7a66ba0 Fixed more spacing bugs. 2004-09-03 06:32:11 +00:00
Scott Long
f93675b033 Fix whitespace from last commit.
Submitted by: ru
2004-09-02 22:21:51 +00:00
Alfred Perlstein
0793d4d1e4 Hook autofs to the build. 2004-09-02 20:44:56 +00:00
Scott Long
9923b511ed Turn PREEMPTION into a kernel option. Make sure that it's defined if
FULL_PREEMPTION is defined.  Add a runtime warning to ULE if PREEMPTION is
enabled (code inspired by the PREEMPTION warning in kern_switch.c).  This
is a possible MT5 candidate.
2004-09-02 18:59:15 +00:00
Brooks Davis
b443062227 General modernization of coda:
- Ditch NVCODA
 - Don't use a static major
 - Don't declare functions extern

Reviewed by:	peter
2004-09-01 01:19:52 +00:00
Peter Wemm
5fe155d0fd Add the mp_watchdog hooks, although it locks up my SMP test box. It might
be useable to somebody.
2004-08-30 23:33:33 +00:00
Peter Wemm
f37a929ca1 Kill count device support from config. I've changed the last few
remaining consumers to have the count passed as an option.  This is
i4b, pc98/wdc, and coda.

Bump configvers.h from 500013 to 600000.

Remove heuristics that tried to parse "device ed5" as 5 units of the ed
device.  This broke things like the snd_emu10k1 device, which required
quotes to make it parse right.  The no-longer-needed quotes have been
removed from NOTES, GENERIC etc.  eg, I've removed the quotes from:
   device  snd_maestro
   device  "snd_maestro3"
   device  snd_mss

I believe everything will still compile and work after this.
2004-08-30 23:03:58 +00:00
Ruslan Ermilov
03fd8674c1 Finish the removal of the HW_WDOG option.
Hopefully, we'll finally have the compilable LINT kernels again.  ;)
2004-08-29 15:03:06 +00:00
Dag-Erling Smørgrav
b8e543f9f1 Back out previous commit, ichwd is i386-only. 2004-08-29 11:26:36 +00:00
Dag-Erling Smørgrav
0eac4495db Remove the HW_WDOG option; it serves no purpose.
MFC after:	3 days
2004-08-29 11:10:09 +00:00
Dag-Erling Smørgrav
6c420ed90e Back out the two previous commits; ichwd is i386-only. 2004-08-29 10:52:39 +00:00
Ian Dowse
776981d545 Add an entry for ichwd to hopefully unbreak the LINT build. 2004-08-29 03:59:49 +00:00
Ian Dowse
83c457dc27 Unconditionally add `-fno-omit-frame-pointer' to CFLAGS when building
modules on the amd64 platform. Without this, ddb stack traces cannot
follow module function calls, which makes debugging very difficult.
2004-08-29 02:00:50 +00:00
Ruslan Ermilov
cd0bd20d63 Fixed untested change. 2004-08-28 19:40:03 +00:00
Alexander Leidinger
3e41e813b7 Add the Intel ICH watchdog timer driver.
Approved by:	des
2004-08-28 15:41:31 +00:00
Robert Watson
1d8cd39e71 Change the default disposition of debug.mpsafenet from 0 to 1, which
will cause the network stack to operate without the Giant lock by
default.  This change has the potential to improve performance by
increasing parallelism and decreasing latency in network processing.

Due to the potential exposure of existing or new bugs, the following
compatibility functionality is maintained:

- It is still possible to disable Giant-free operation by setting
  debug.mpsafenet to 0 in loader.conf.

- Add "options NET_WITH_GIANT", which will restore the default value of
  debug.mpsafenet to 0, and is intended for use on systems compiled with
  known unsafe components, or where a more conservative configuration is
  desired.

- Add a new declaration, NET_NEEDS_GIANT("componentname"), which permits
  kernel components to declare dependence on Giant over the network
  stack.  If the declaration is made by a preloaded module or a compiled
  in component, the disposition of debug.mpsafenet will be set to 0 and
  a warning concerning performance degraded operation printed to the
  console.  If it is declared by a loadable kernel module after boot, a
  warning is displayed but the disposition cannot be changed.  This is
  implemented by defining a new SYSINIT() value, SI_SUB_SETTINGS, which
  is intended for the processing of configuration choices after tunables
  are read in and the console is available to generate errors, but
  before much else gets going.

This compatibility behavior will go away when we've finished the last
of the locking work and are confident that operation is correct.
2004-08-28 15:11:13 +00:00
Marcel Moolenaar
f697dffaa4 Have the linker provide the btext symbol when referenced. This is needed
for profiling kernels. Apparently, nobody has ever tried to build one on
alpha...
2004-08-27 19:13:35 +00:00
Andre Oppermann
4429922511 Properly document and enable the IPFIREWALL_FORWARD option. 2004-08-27 15:46:16 +00:00
Andre Oppermann
c21fd23260 Always compile PFIL_HOOKS into the kernel and remove the associated kernel
compile option.  All FreeBSD packet filters now use the PFIL_HOOKS API and
thus it becomes a standard part of the network stack.

If no hooks are connected the entire packet filter hooks section and related
activities are jumped over.  This removes any performance impact if no hooks
are active.

Both OpenBSD and DragonFlyBSD have integrated PFIL_HOOKS permanently as well.
2004-08-27 15:16:24 +00:00
Marcel Moolenaar
09814dd676 Have the linker provide btext. It's used for profiling. 2004-08-25 07:43:28 +00:00
Robert Watson
c415679d71 Remove in6_prefix.[ch] and the contained router renumbering capability.
The prefix management code currently resides in nd6, leaving only the
unused router renumbering capability in the in6_prefix files.  Removing
it will make it easier for us to provide locking for the remainder of
IPv6 by reducing the number of objects requiring synchronized access.

This functionality has also been removed from NetBSD and OpenBSD.

Submitted by:	George Neville-Neil <gnn at neville-neil.com>
Discussed with/approved by:	suz, keiichi at kame.net, core at kame.net
2004-08-23 03:00:27 +00:00
Yoshihiro Takahashi
3cabe66353 MFi386: revision 1.215. 2004-08-22 15:13:08 +00:00
David E. O'Brien
f49f2ca64e Unconditionally support the AMD64 GART HW. 2004-08-19 20:58:24 +00:00
Andre Oppermann
6c493365ce Add comment that IPFIREWALL now requires option PFIL_HOOKS. 2004-08-19 18:29:55 +00:00
John-Mark Gurney
000968010a add options MPROF_BUFFERS and MPROF_HASH_SIZE that adjust the sizes of
the mutex profiling buffers.  Document them in the man page and in NOTES.
Ensure _HASH_SIZE is larger than _BUFFERS with a cpp error.
2004-08-19 06:38:26 +00:00
Robert Watson
4b4b27248c Since pc98 shares the AGP driver with the i386, also define the
amd64 agp option here in order to let the pc98 kernel build
complete.  This doesn't seem right, since there probably aren't
plans to build a pc98 amd64 box; however, it's not clear to me
how to get config to generate an opt_agp.h without an option
defined.
2004-08-18 03:46:39 +00:00
Scott Long
99ae32dced HEAD is now 6-CURRENT 2004-08-18 00:21:12 +00:00
Andre Oppermann
9b932e9e04 Convert ipfw to use PFIL_HOOKS. This is change is transparent to userland
and preserves the ipfw ABI.  The ipfw core packet inspection and filtering
functions have not been changed, only how ipfw is invoked is different.

However there are many changes how ipfw is and its add-on's are handled:

 In general ipfw is now called through the PFIL_HOOKS and most associated
 magic, that was in ip_input() or ip_output() previously, is now done in
 ipfw_check_[in|out]() in the ipfw PFIL handler.

 IPDIVERT is entirely handled within the ipfw PFIL handlers.  A packet to
 be diverted is checked if it is fragmented, if yes, ip_reass() gets in for
 reassembly.  If not, or all fragments arrived and the packet is complete,
 divert_packet is called directly.  For 'tee' no reassembly attempt is made
 and a copy of the packet is sent to the divert socket unmodified.  The
 original packet continues its way through ip_input/output().

 ipfw 'forward' is done via m_tag's.  The ipfw PFIL handlers tag the packet
 with the new destination sockaddr_in.  A check if the new destination is a
 local IP address is made and the m_flags are set appropriately.  ip_input()
 and ip_output() have some more work to do here.  For ip_input() the m_flags
 are checked and a packet for us is directly sent to the 'ours' section for
 further processing.  Destination changes on the input path are only tagged
 and the 'srcrt' flag to ip_forward() is set to disable destination checks
 and ICMP replies at this stage.  The tag is going to be handled on output.
 ip_output() again checks for m_flags and the 'ours' tag.  If found, the
 packet will be dropped back to the IP netisr where it is going to be picked
 up by ip_input() again and the directly sent to the 'ours' section.  When
 only the destination changes, the route's 'dst' is overwritten with the
 new destination from the forward m_tag.  Then it jumps back at the route
 lookup again and skips the firewall check because it has been marked with
 M_SKIP_FIREWALL.  ipfw 'forward' has to be compiled into the kernel with
 'option IPFIREWALL_FORWARD' to enable it.

 DUMMYNET is entirely handled within the ipfw PFIL handlers.  A packet for
 a dummynet pipe or queue is directly sent to dummynet_io().  Dummynet will
 then inject it back into ip_input/ip_output() after it has served its time.
 Dummynet packets are tagged and will continue from the next rule when they
 hit the ipfw PFIL handlers again after re-injection.

 BRIDGING and IPFW_ETHER are not changed yet and use ipfw_chk() directly as
 they did before.  Later this will be changed to dedicated ETHER PFIL_HOOKS.

More detailed changes to the code:

 conf/files
	Add netinet/ip_fw_pfil.c.

 conf/options
	Add IPFIREWALL_FORWARD option.

 modules/ipfw/Makefile
	Add ip_fw_pfil.c.

 net/bridge.c
	Disable PFIL_HOOKS if ipfw for bridging is active.  Bridging ipfw
	is still directly invoked to handle layer2 headers and packets would
	get a double ipfw when run through PFIL_HOOKS as well.

 netinet/ip_divert.c
	Removed divert_clone() function.  It is no longer used.

 netinet/ip_dummynet.[ch]
	Neither the route 'ro' nor the destination 'dst' need to be stored
	while in dummynet transit.  Structure members and associated macros
	are removed.

 netinet/ip_fastfwd.c
	Removed all direct ipfw handling code and replace it with the new
	'ipfw forward' handling code.

 netinet/ip_fw.h
	Removed 'ro' and 'dst' from struct ip_fw_args.

 netinet/ip_fw2.c
	(Re)moved some global variables and the module handling.

 netinet/ip_fw_pfil.c
	New file containing the ipfw PFIL handlers and module initialization.

 netinet/ip_input.c
	Removed all direct ipfw handling code and replace it with the new
	'ipfw forward' handling code.  ip_forward() does not longer require
	the 'next_hop' struct sockaddr_in argument.  Disable early checks
	if 'srcrt' is set.

 netinet/ip_output.c
	Removed all direct ipfw handling code and replace it with the new
	'ipfw forward' handling code.

 netinet/ip_var.h
	Add ip_reass() as general function.  (Used from ipfw PFIL handlers
	for IPDIVERT.)

 netinet/raw_ip.c
	Directly check if ipfw and dummynet control pointers are active.

 netinet/tcp_input.c
	Rework the 'ipfw forward' to local code to work with the new way of
	forward tags.

 netinet/tcp_sack.c
	Remove include 'opt_ipfw.h' which is not needed here.

 sys/mbuf.h
	Remove m_claim_next() macro which was exclusively for ipfw 'forward'
	and is no longer needed.

Approved by:	re (scottl)
2004-08-17 22:05:54 +00:00
Justin T. Gibbs
7afc02188a Add an ISA attachement to the aic7xxx driver to handle 284X controllers.
The ISA probe uses an identify routine to probe all slot locations from
1 to 14 that do not conflict with other allocated resources.  This required
making aic7770.c part of the driver core when compiled as a module.

aic7xxx.c:
aic79xx.c:
aic_osm_lib.c:
	Use aic_scb_timer_start() consistently to start the watchdog timer.
	This removes a few places that verbatum copied the code in
	aic_scb_timer_start().

	During recovery processing, allow commands to still be queued to
	the controller.  The only requirement we have is that our recovery
	command be queued first - something the code already guaranteed.
	The only other change required to make this work is to prevent
	timers from being started for these newly queued commands.

Approved by: re
2004-08-17 00:14:31 +00:00
Marcel Moolenaar
97752b2cbd Catch up with the drive-by renaming of IA32 to COMPAT_IA32. It must
have been rush hour...

While here, move COMPAT_IA32 from opt_global.h to opt_compat.h like on
amd64. Consequently, it's unsafe to use the option in pcb.h. We now
unconditionally have the ia32 specific registers in the PCB.

This commit is untested.
2004-08-16 18:54:23 +00:00
Robert Watson
56af75a582 Add MP_WATCHDOG option information to pc98, as it uses the i386
mp_machdep.c, which relies on the option's include file and
defines.

Constancy of:	tinderbox
2004-08-16 13:59:01 +00:00
Suleiman Souhlal
c0763d3763 Add /dev/mem and /dev/kmem to powerpc.
Approved by:	grehan (mentor)
2004-08-16 13:07:40 +00:00
David E. O'Brien
7a071c6a49 Complete 'IA32' -> 'COMPAT_IA32' change for the Linuxulator32. 2004-08-16 12:51:33 +00:00
David E. O'Brien
3c749e3fb1 AMD64 on-CPU GART support.
This also applies to AMD64 HW running 'i386' OS.

Submitted by:	Jung-uk Kim <jkim@niksun.com>
Integration by:	obrien
2004-08-16 12:25:48 +00:00
David E. O'Brien
c680f6b12d I'm not sure what tjr envisioned for turning on FreeBSD/i386 rt support,
but make it COMPAT_IA32 for now.
Fix the 'DEBUG' argument code to unbreak the amd64 LINT build.
2004-08-16 11:09:59 +00:00
Tim J. Robbins
ea0fabbc4f Add preliminary support for running 32-bit Linux binaries on amd64, enabled
with the COMPAT_LINUX32 option. This is largely based on the i386 MD Linux
emulations bits, but also builds on the 32-bit FreeBSD and generic IA-32
binary emulation work.

Some of this is still a little rough around the edges, and will need to be
revisited before 32-bit and 64-bit Linux emulation support can coexist in
the same kernel.
2004-08-16 07:55:06 +00:00
Pawel Jakub Dawidek
e81856c34c Connect RAID3 GEOM class to the build. 2004-08-16 06:36:21 +00:00
Marius Strobl
9c0c82c161 Add a kludge for building SBus-only kernels, i.e. kernels without support
for EBus, ISA and PCI, by compiling ofw_isa.c and ofw_pci_if.m unconditio-
nally. The correct way is to rewrite OF_decode_addr() in ofw_machdep.c in
a bus-neutral way. That's certainly possible but we unfortunately didn't
make it for FreeBSD 5.3.

Approved by:	tmm
2004-08-15 22:59:34 +00:00
Robert Watson
a632deec30 Add an "options MP_WATCHDOG" to i386. This option allows one of the
logical CPUs on a system to be used as a dedicated watchdog to cause a
drop to the debugger and/or generate an NMI to the boot processor if
the kernel ceases to respond.  A sysctl enables the watchdog running
out of the processor's idle thread; a callout is launched to reset a
timer in the watchdog.  If the callout fails to reset the timer for ten
seconds, the watchdog will fire.  The sysctl allows you to select which
CPU will run the watchdog.

A sample "debug.leak_schedlock" is included, which causes a sysctl to
spin holding sched_lock in order to trigger the watchdog.  On my Xeons,
the watchdog is able to detect this failure mode and break into the
debugger, which cannot otherwise be done without an NMI button.

This option does not currently work with sched_ule due to ule's push
notion of scheduling, similar to machdep.hlt_logical_cpus failing to
work with that scheduler.

On face value, this might seem somewhat inefficient, but there are a
lot of dual-processor Xeons with HTT around, so using one as a watchdog
for testing is not as inefficient as one might fear.
2004-08-15 18:02:09 +00:00
Marius Strobl
adb03c6788 sio(4), which never really worked on sparc64, was removed in favour of
uart(4) in sparc64/conf/GENERIC revision 1.63 about 9 months ago. Remove
its source files here, too.
2004-08-15 00:10:59 +00:00
Marius Strobl
d25ed517a4 Add sparc64/pci/ofw_pci_if.m to the list of MFILES so modules can use
sparc64/pci/ofw_pci.h. This is a bit messy right now but (hopefully) will
get better once the MI OFW PCI code has moved from sparc64/pci to dev/ofw.
2004-08-14 23:53:04 +00:00
Marius Strobl
52c07e1c12 Add hme(4) here now that it's MI. 2004-08-14 22:38:50 +00:00
David Malone
1f44b0a1b5 Get rid of the RANDOM_IP_ID option and make it a sysctl. NetBSD
have already done this, so I have styled the patch on their work:

        1) introduce a ip_newid() static inline function that checks
        the sysctl and then decides if it should return a sequential
        or random IP ID.

        2) named the sysctl net.inet.ip.random_id

        3) IPv6 flow IDs and fragment IDs are now always random.
        Flow IDs and frag IDs are significantly less common in the
        IPv6 world (ie. rarely generated per-packet), so there should
        be smaller performance concerns.

The sysctl defaults to 0 (sequential IP IDs).

Reviewed by:	andre, silby, mlaier, ume
Based on:	NetBSD
MFC after:	2 months
2004-08-14 15:32:40 +00:00
Ruslan Ermilov
48aea4da66 Removed COPTS support from kmod.mk and kern.pre.mk.
COPTS support in bsd.prog.mk is preserved but discouraged.
2004-08-13 14:30:26 +00:00
Max Khon
75261008d7 Add geom_uzip -- geom class that implements read-only compressed disks.
Currently supports cloop V2.0 disk compression format.
May support more formats in future.
2004-08-13 09:40:58 +00:00