dragonfly.git
15 years agopanic() normally tries to sync. Add a sysctl to control the behavior in
Matthew Dillon [Sun, 16 Nov 2003 02:41:46 +0000 (02:41 +0000)]
panic() normally tries to sync.  Add a sysctl to control the behavior in
order to facilitate debugging.

Submitted-by: YONETANI Tomokazu <qhwt@myrealbox.com>
15 years agoCorrect bugs introduced in the last syscall separation commit. The
Matthew Dillon [Sun, 16 Nov 2003 02:37:39 +0000 (02:37 +0000)]
Correct bugs introduced in the last syscall separation commit.  The
argument list for shell scripts was not being properly rewritten, corrupting
the argv list and environment.

15 years agoFix a bug in signal translation introduced in last revision. This effects
David P. Reese, Jr. [Sun, 16 Nov 2003 01:50:54 +0000 (01:50 +0000)]
Fix a bug in signal translation introduced in last revision.  This effects
linux_signal() and linux_rt_sigaction().

15 years ago * K&R function cleanup
Eirik Nygaard [Sat, 15 Nov 2003 23:33:35 +0000 (23:33 +0000)]
 * K&R function cleanup

15 years agoConvert files from DOS to Unix.
Jeroen Ruigrok/asmodai [Sat, 15 Nov 2003 21:12:53 +0000 (21:12 +0000)]
Convert files from DOS to Unix.

Found by: makeobjops.awk and vim

15 years agoMisc cleanups to take care of GCC3.x warnings. Missing 'U' and 'LL'
Matthew Dillon [Sat, 15 Nov 2003 21:05:44 +0000 (21:05 +0000)]
Misc cleanups to take care of GCC3.x warnings.  Missing 'U' and 'LL'
postfixes on large unsigned or 64 bit constants, non-storage structural
declarations embedded in structures, deprecated use of __FUNCTION__,
missing 'break' statements in the last switch case, goto label ops where
the label occurs just before an end-brace (many of which appear to be
fixable with 'break' or 'continue' instead and existed simply due to
programmer-paranoia), garbage data in #endif lines that was not commented
out.  GCC3 also caught some argument count issues in kernel printfs.

Many of these (obvious) fixes are similar to or copied from 5.x.

Also fix a few other minor issues such as certain drivers declaring a
proc pointer instead of a thread pointer.

Move -ffreestanding from CWARNFLAGS to CFLAGS.  It doesn't belong in
CWARNFLAGS.

15 years ago * K&R function cleanup
Eirik Nygaard [Sat, 15 Nov 2003 20:33:43 +0000 (20:33 +0000)]
 * K&R function cleanup

15 years agoChange wrapping definition from ending in DECLARED_ to DECLARED.
Jeroen Ruigrok/asmodai [Sat, 15 Nov 2003 19:28:42 +0000 (19:28 +0000)]
Change wrapping definition from ending in DECLARED_ to DECLARED.
This makes it consistent with other definitions and has as added bonus that
rpm compiles again.
Furthermore it keeps us synchronised to FreeBSD 5.x.

15 years agoMove bsd.kern.mk from /usr/src/share/mk to /usr/src/sys/conf and
Matthew Dillon [Sat, 15 Nov 2003 19:01:35 +0000 (19:01 +0000)]
Move bsd.kern.mk from /usr/src/share/mk to /usr/src/sys/conf and
unconditionally include it in the various Makefile's that reference it.
This ensures that the proper bsd.kern.mk is used.

15 years agoAdd __DragonFly_version, set to 100000, which basically means:
Jeroen Ruigrok/asmodai [Sat, 15 Nov 2003 11:46:26 +0000 (11:46 +0000)]
Add __DragonFly_version, set to 100000, which basically means:

DragonFly version 1.0.0, allowing for 999 updates before we are forced
to update the last revision number.

Do note that it hasn't replaced the current naming or numbering in the
DragonFly system.

15 years agoImplement linux_mmap2().
David P. Reese, Jr. [Sat, 15 Nov 2003 03:52:33 +0000 (03:52 +0000)]
Implement linux_mmap2().

FreeBSD PR: kern/45785

15 years agoImplement linux_truncate64() and linux_ftruncate64().
David P. Reese, Jr. [Sat, 15 Nov 2003 03:23:34 +0000 (03:23 +0000)]
Implement linux_truncate64() and linux_ftruncate64().

15 years agoImplement linux_truncate64() and linux_ftruncate64().
David P. Reese, Jr. [Sat, 15 Nov 2003 00:40:06 +0000 (00:40 +0000)]
Implement linux_truncate64() and linux_ftruncate64().

FreeBSD PR: kern/45785

15 years agoPrep for GCC 3.x kernel compiles, stage 2/2: Remove bad __asm embedded-newline
Matthew Dillon [Fri, 14 Nov 2003 22:58:33 +0000 (22:58 +0000)]
Prep for GCC 3.x kernel compiles, stage 2/2: Remove bad __asm embedded-newline
syntax, add -ffreestanding (which is GCC 2.95.x compatible), modify the
-I path slightly in sys/dev/disk/aic7xxx/aicasm/Makefile, and remove improper
combination of __asm("ax") and a later __asm instruction.

Submitted-by: Craig Dooley <craig@xlnx-x.net>
15 years agoSync with FreeBSD-5.x MODULE_DEPEND() and DECLARE_MODULE() broke viapm.
David P. Reese, Jr. [Fri, 14 Nov 2003 21:46:18 +0000 (21:46 +0000)]
Sync with FreeBSD-5.x MODULE_DEPEND() and DECLARE_MODULE() broke viapm.
Sync iiconf.h and smbconf.h with FreeBSD-5.1 to remedy the situation.

15 years agoRemove an unused variable from last commit.
David P. Reese, Jr. [Fri, 14 Nov 2003 21:18:41 +0000 (21:18 +0000)]
Remove an unused variable from last commit.

15 years agoSplit mmap().
David P. Reese, Jr. [Fri, 14 Nov 2003 20:54:07 +0000 (20:54 +0000)]
Split mmap().

Move ovadvise(), ogetpagesize() and ommap() to new file 43bsd/43bsd_vm.c.

http://gomerbud.com/daver/patches/dragonfly/syscall-separation-15.diff

15 years agoAdd a make variable listing obsolete header files that need to be removed
Matthew Dillon [Fri, 14 Nov 2003 20:12:53 +0000 (20:12 +0000)]
Add a make variable listing obsolete header files that need to be removed
from the target directory.  Set it to machine/ansi.h and sys/inttypes.h.
machine/ansi.h's functionality has been taken over by machine/stdint.h.

15 years agoFix bug in last syscall separation commit, an extra semicolon was causing
Matthew Dillon [Fri, 14 Nov 2003 19:31:22 +0000 (19:31 +0000)]
Fix bug in last syscall separation commit, an extra semicolon was causing
mkfifo to return early and leave vnodes locked.

15 years agoFix long interface name handling.
Hiten Pandya [Fri, 14 Nov 2003 09:56:03 +0000 (09:56 +0000)]
Fix long interface name handling.

I found this when I was creating a test VLAN setup, where I had interface
named as vlan50 and vlan100.  These were truncated to vlan5 or vlan1. While
I am here, also fix the NetIf column in ``netstat -r'' output.

15 years agoAdd a prototype for if_indextoname().
Hiten Pandya [Fri, 14 Nov 2003 09:53:46 +0000 (09:53 +0000)]
Add a prototype for if_indextoname().

For some odd reason, the function was used without a prototype
in netstat(8).

15 years ago__P removal.
Matthew Dillon [Fri, 14 Nov 2003 03:54:33 +0000 (03:54 +0000)]
__P removal.

Submitted-by: Craig Dooley <craig@xlnx-x.net>
15 years agoMove ogetkerninfo() to the compat tree without any changes.
David P. Reese, Jr. [Fri, 14 Nov 2003 02:54:52 +0000 (02:54 +0000)]
Move ogetkerninfo() to the compat tree without any changes.

15 years ago* How did these get here.
David Rhodus [Fri, 14 Nov 2003 02:43:24 +0000 (02:43 +0000)]
* How did these get here.
Remove some __P() macros because their not cool anymore.

15 years agoMove ogethostname(), osethostname(), ogethostid(), osethostid(), and
David P. Reese, Jr. [Fri, 14 Nov 2003 01:53:55 +0000 (01:53 +0000)]
Move ogethostname(), osethostname(), ogethostid(), osethostid(), and
oquota() to the 43bsd emulation subtree.

Change o{get,set}hostname() to use kernel_sysctl() instead of
userland_sysctl().

15 years agoKill two more stackgap allocations. One is in linux_sysctl(). The other
David P. Reese, Jr. [Fri, 14 Nov 2003 01:32:45 +0000 (01:32 +0000)]
Kill two more stackgap allocations.  One is in linux_sysctl().  The other
is in linux_rt_sigreturn().

15 years agoRemove __P() macros from include/
Matthew Dillon [Fri, 14 Nov 2003 01:01:51 +0000 (01:01 +0000)]
Remove __P() macros from include/

Submitted-by: Craig Dooley <cd5697@albany.edu>
15 years agoMT_TAG mbufs are terrible hacks and cannot be freed. Skip any MT_TAGs
Matthew Dillon [Fri, 14 Nov 2003 00:45:20 +0000 (00:45 +0000)]
MT_TAG mbufs are terrible hacks and cannot be freed.  Skip any MT_TAGs
before freeing mbufs sent to a netisr without a handler.

15 years agoBring in the MODULE_DEPEND() and DECLARE_MODULE() macros from FreeBSD-5.x.
Matthew Dillon [Fri, 14 Nov 2003 00:37:24 +0000 (00:37 +0000)]
Bring in the MODULE_DEPEND() and DECLARE_MODULE() macros from FreeBSD-5.x.
Instead of trying to bring in the 5.x kern/kern_loader.c and related code,
which is a huge complex mess, instead properly declare the miibus module
and check preload files against static in-kernel modules and ignore any
preloaded modules that arleady exist in-kernel based on DECLARE_MODULE()
matching up.

This solves a problem where the bootloader attempts to load module
dependancies along with their modules (e.g. if if_fxp is loaded then miibus
is also loaded).  If the kernel already had a miibus module built in this
resulted in two miibus modules which resulted in a crash.

15 years agoRefuse to load dependancies from the root filesystem during early boot when
Matthew Dillon [Thu, 13 Nov 2003 22:02:42 +0000 (22:02 +0000)]
Refuse to load dependancies from the root filesystem during early boot when
the root filesystem hasn't been mounted yet.  This prevents a panic when
the boot loader does not properly load module dependancies.

15 years ago* Fix a locking issue inside the inode hashing code which
David Rhodus [Thu, 13 Nov 2003 16:26:42 +0000 (16:26 +0000)]
*       Fix a locking issue inside the inode hashing code which
        results in a panic situation.

Fix written by: Matt Dillon
Extensive testing by: David Rhodus
~

15 years agoThe MBWTest program (/tmp/mbw1) attempts to figure out the L1 and L2
Matthew Dillon [Thu, 13 Nov 2003 07:10:36 +0000 (07:10 +0000)]
The MBWTest program (/tmp/mbw1) attempts to figure out the L1 and L2
cache sizes and measures L1, L2, and non-cached linear memory bandwidth.

15 years agoSplit mkfifo().
David P. Reese, Jr. [Thu, 13 Nov 2003 04:04:42 +0000 (04:04 +0000)]
Split mkfifo().

Trash the CHECKALT{CREAT,EXIST} macros and friends.  Implement
linux_copyin_path() and linux_free_path() for path translation without
using the stackgap.

Use the above and recently split syscalls to remove stackgap allocations
from linux_creat(), linux_open(), linux_lseek(), linux_llseek(),
linux_access(), linux_unlink(), linux_chdir(), linux_chmod(),
linux_mkdir(), linux_rmdir(), linux_rename(), linux_symlink(),
linux_readlink(), linux_truncate(), linux_link(), linux_chown(),
linux_lchown(), linux_uselib(), linux_utime(), linux_mknod(),
linux_newstat(), linux_newlstat(), linux_statfs(), linux_stat64(),
linux_lstat64(), linux_chown16(), linux_lchown16(), linux_execve().

Split use split syscalls to reimplement linux_fstatfs().

Implement linux_translate_path() for use in exec_linux_imgact_try().

15 years ago* Fix some __P() mess up.
David Rhodus [Thu, 13 Nov 2003 02:39:42 +0000 (02:39 +0000)]
* Fix some __P() mess up.

15 years agocleanup extra )'s missed by the __P commit.
Matthew Dillon [Thu, 13 Nov 2003 00:14:52 +0000 (00:14 +0000)]
cleanup extra )'s missed by the __P commit.

15 years agoAdd Marvell chipset support. Adding the PCI ID is all that was needed.
Matthew Dillon [Wed, 12 Nov 2003 22:43:07 +0000 (22:43 +0000)]
Add Marvell chipset support.  Adding the PCI ID is all that was needed.

Submitted-by: Jung-uk Kim <jkim@niksun.com>
15 years agoPrep for GCC 3.x kernel compiles, stage 1/2: Remove bad C syntax including
Matthew Dillon [Wed, 12 Nov 2003 22:08:09 +0000 (22:08 +0000)]
Prep for GCC 3.x kernel compiles, stage 1/2: Remove bad C syntax including
use ofthe HIDENAME macro with '.', embedded newlines in quoted strings, '#'
comments in .S files, bogus trailing ## concactenation in C macros,
improper ## concactenations, and some minor mismatched types in switch
statements.

Submitted-by: Craig Dooley <craig@xlnx-x.net>
15 years ago * Removed the __P macros from lib/
Eirik Nygaard [Wed, 12 Nov 2003 20:21:31 +0000 (20:21 +0000)]
 * Removed the __P macros from lib/

 * Small fixups by me in lib/libcr, there was some stale ')' after the __P( was
   removed from the line above.

Submitted-by: Craig Dooley <craig@xlnx-x.net>
15 years ago * Add missing $DragonFly$ keywords.
Eirik Nygaard [Wed, 12 Nov 2003 18:07:03 +0000 (18:07 +0000)]
 * Add missing $DragonFly$ keywords.

15 years ago * Get rid of of the _BSD_XXX type usage.
Eirik Nygaard [Wed, 12 Nov 2003 17:31:17 +0000 (17:31 +0000)]
 * Get rid of of the _BSD_XXX type usage.
 * Correct small typo __ct_rune_T -> __ct_rune_t

15 years ago * __P removal from games/
Eirik Nygaard [Wed, 12 Nov 2003 14:53:54 +0000 (14:53 +0000)]
 * __P removal from games/

Submitted-by: Craig Dooley <craig@xlnx-x.net>
15 years agoRemind myself and others that kern_readlink() isn't properly split yet.
David P. Reese, Jr. [Wed, 12 Nov 2003 10:11:09 +0000 (10:11 +0000)]
Remind myself and others that kern_readlink() isn't properly split yet.
There are copyin() calls burried in VOP_READLINK().

15 years agoSplit execve(). This required some interesting changes to the shell
David P. Reese, Jr. [Wed, 12 Nov 2003 01:00:33 +0000 (01:00 +0000)]
Split execve().  This required some interesting changes to the shell
image activation code and the image_params structure.

Userland pointers are no longer passed in the image_params structure.
The exec_copyin_args() function now pulls the arguments, environment
and filename of the target being execve()'d into a kernel space buffer
before calling kern_execve().

The exec_shell_imgact() function does some magic to prepend the
interpreter arguments.

15 years agoThe big syscall split commit broke utimes(), lutimes() and futimes() when
David P. Reese, Jr. [Tue, 11 Nov 2003 14:33:23 +0000 (14:33 +0000)]
The big syscall split commit broke utimes(), lutimes() and futimes() when
passed a NULL timeval structure.

15 years agoThe recent lseek() fix didn't touch olseek(). I don't see why, as olseek()
David P. Reese, Jr. [Tue, 11 Nov 2003 09:28:15 +0000 (09:28 +0000)]
The recent lseek() fix didn't touch olseek().  I don't see why, as olseek()
isn't even used in the currently utilized emulation code.

Return the result in the sysmsg_offset field.  Silences a compiler warning.

15 years agoMost code that calls vm_object_allocate() assumes that the allocation will
Matthew Dillon [Tue, 11 Nov 2003 01:35:36 +0000 (01:35 +0000)]
Most code that calls vm_object_allocate() assumes that the allocation will
succeed.  Set the flag to cause the VM object zone to panic if it is unable
to allocate a VM object (so we don't get incomprehensible fatal null pointer
traps in the kernel).

15 years agoAdd the varsym_list() system call and add listing support to the varsym
Matthew Dillon [Tue, 11 Nov 2003 00:04:17 +0000 (00:04 +0000)]
Add the varsym_list() system call and add listing support to the varsym
utility.

Work done by:  Eirik Nygaard <eirikn@kerneled.com> and Matt Dillon

15 years agoAdd the varsym_list() system call and add listing support to the varsym
Matthew Dillon [Mon, 10 Nov 2003 23:58:59 +0000 (23:58 +0000)]
Add the varsym_list() system call and add listing support to the varsym
utility.

Work done by:  Eirik Nygaard <eirikn@kerneled.com> and Matt Dillon

15 years agoThe last major syscall separation commit completely broke our lseek() as well
Matthew Dillon [Mon, 10 Nov 2003 20:57:18 +0000 (20:57 +0000)]
The last major syscall separation commit completely broke our lseek() as well
as the linux emulated lseek().  It's sheer luck that the system works at
all :-).  Fix lseek's 64 bit return value.

15 years agoProperly document getenv()'s return values using a slightly altered patch.
Jeroen Ruigrok/asmodai [Mon, 10 Nov 2003 19:48:53 +0000 (19:48 +0000)]
Properly document getenv()'s return values using a slightly altered patch.

Submitted by: ?
FreeBSD PR: docs/58033

15 years agoMake sure to skip the PC98 architecture on the OPTi detection, since it
Jeroen Ruigrok/asmodai [Mon, 10 Nov 2003 19:29:42 +0000 (19:29 +0000)]
Make sure to skip the PC98 architecture on the OPTi detection, since it
obscures a CS sound card.

Submitted by: Watanabe Kazuhiro <CQG00620@nifty.ne.jp>
FreeBSD PR: kern/45673

15 years agoWhat happens when you mod a negative number? Mask off the hash value before
Matthew Dillon [Mon, 10 Nov 2003 18:32:59 +0000 (18:32 +0000)]
What happens when you mod a negative number?  Mask off the hash value before
modding so the returned value doesn't overflow the thread array when hashing
packets.

Also disable the multi-threaded networking by default.  Setting
net.inet.ip.mthread_enable to 1 will enable it.

15 years agoDocument the edx assignment to fds[1]
Matthew Dillon [Mon, 10 Nov 2003 18:29:33 +0000 (18:29 +0000)]
Document the edx assignment to fds[1]

15 years agoAdd buffer bounds checking during check pointing since it is possible for
Matthew Dillon [Mon, 10 Nov 2003 18:09:13 +0000 (18:09 +0000)]
Add buffer bounds checking during check pointing since it is possible for
things to change between passes.

Add additional NULL v_mount checks related to linux ptrace (from Kip)

15 years ago* s/FreeBSD/DragonFly/ So I know what system I'm booting up now.
David Rhodus [Mon, 10 Nov 2003 15:35:34 +0000 (15:35 +0000)]
* s/FreeBSD/DragonFly/ So I know what system I'm booting up now.

15 years agoAdd a temporary workaround to prevent a panic due to a truss related problem.
Matthew Dillon [Mon, 10 Nov 2003 09:24:39 +0000 (09:24 +0000)]
Add a temporary workaround to prevent a panic due to a truss related problem.

Submitted-by: Kip Macy <kmacy@fsmware.com>
15 years agoFully synchronize sys/boot from FreeBSD-5.x, but add / to the module path
Matthew Dillon [Mon, 10 Nov 2003 06:14:44 +0000 (06:14 +0000)]
Fully synchronize sys/boot from FreeBSD-5.x, but add / to the module path
so /kernel will be found and loaded instead of /boot/kernel.  This will
give us all the capabilities of the FreeBSD-5 boot code including AMD64 and
ELF64 support.

This commit brings userland up to date with the kernel and boot code changes,
primarily due to sys/diskmbr.h separation from sys/disklabel.h, and
linker_set changes.

15 years agoFully synchronize sys/boot from FreeBSD-5.x, but add / to the module path
Matthew Dillon [Mon, 10 Nov 2003 06:12:17 +0000 (06:12 +0000)]
Fully synchronize sys/boot from FreeBSD-5.x, but add / to the module path
so /kernel will be found and loaded instead of /boot/kernel.  This will
give us all the capabilities of the FreeBSD-5 boot code including AMD64 and
ELF64 support.

As part of this work, rather then try to adjust ufs/fs.h and friends to get
UFS2 info I instead copied the fs.h and friends from FreeBSD-5 into the
sys/boot subtree

Additionally, import Peter Wemm's linker set improvements from FreeBSD-5.x.
They happen to be compatible with GCC 2.95.x and it allows very few changes
to be made to the boot code.

Additionally import a number of other elements from FreeBSD-5 including
sys/diskmbr.h separation.

15 years agoFully synchronize sys/boot from FreeBSD-5.x, but add / to the module path
Matthew Dillon [Mon, 10 Nov 2003 06:08:40 +0000 (06:08 +0000)]
Fully synchronize sys/boot from FreeBSD-5.x, but add / to the module path
so /kernel will be found and loaded instead of /boot/kernel.  This will
give us all the capabilities of the FreeBSD-5 boot code including AMD64 and
ELF64 support.

As part of this work, rather then try to adjust ufs/fs.h and friends to get
UFS2 info I instead copied the fs.h and friends from FreeBSD-5 into the
sys/boot subtree

Additionally, import Peter Wemm's linker set improvements from FreeBSD-5.x.
They happen to be compatible with GCC 2.95.x and it allows very few changes
to be made to the boot code.

NOTE!  UFS2 support is not enabled by default as of this commit because it
causes boot2 to run over its limit by 88 bytes.

15 years agoCatch attempts to queue to unregistered ISRs
Matthew Dillon [Mon, 10 Nov 2003 05:00:50 +0000 (05:00 +0000)]
Catch attempts to queue to unregistered ISRs

15 years agoAdd Veritas NetBackup.
Jeroen Ruigrok/asmodai [Sun, 9 Nov 2003 20:43:01 +0000 (20:43 +0000)]
Add Veritas NetBackup.

15 years agoAdd Subversion's port number.
Jeroen Ruigrok/asmodai [Sun, 9 Nov 2003 20:40:04 +0000 (20:40 +0000)]
Add Subversion's port number.

15 years agoAdd protocols 134 and 135.
Jeroen Ruigrok/asmodai [Sun, 9 Nov 2003 20:36:18 +0000 (20:36 +0000)]
Add protocols 134 and 135.

15 years agoImplement variant symlinks! In order to use variant symlinks you must first
Matthew Dillon [Sun, 9 Nov 2003 20:29:59 +0000 (20:29 +0000)]
Implement variant symlinks!  In order to use variant symlinks you must first
enable them with the vfs.varsym_enable sysctl.  Variant symlinks are disabled
by default (the default will change in the future).  WORK TODO: system-wide
and per-user variable sets need to be per-jail, and a method of listing
existing variables is needed.

The 'varsym' utility may be used to set and retrieve system-wide or per-user
variables regardless of whether variant symlinks are enabled or not.  Note
that per-process variables may also be set by a program (e.g. like a csh
builtin or explicitly by a program).

When enabled, variable replacement will occur on softlinks which are
resolved as part of path lookup.  ${VARNAME} patterns within the softlink
will be replaced by the contents of the variable.  If a variable does not
exist, no replacement occurs.  ENAMETOOLONG will occur if a post-replacement
softlink pattern exceeds MAXPATHLEN (1024 bytes).

Note that variable names are case sensitive.  The per-process varsym list
is checked first, then the per-user list, then the system-wide list.

15 years ago3c940 bug fix update. This patch simplifies IFF_PROMISC checking from
Matthew Dillon [Sun, 9 Nov 2003 19:22:51 +0000 (19:22 +0000)]
3c940 bug fix update.  This patch simplifies IFF_PROMISC checking from
sk_ioctl() and prevents the inteface from getting re-initialized when you
change other flags, e.g., arp.  It also fixes a interface up/down while in
promiscuous mode bug.

Written by: Jung-uk Kim <jkim@niksun.com>
Relayed by: Wilko Bulte <wkb@freebie.xs4all.nl>

15 years ago* Add ACPI to the LINT build.
David Rhodus [Sun, 9 Nov 2003 19:04:35 +0000 (19:04 +0000)]
* Add ACPI to the LINT build.

15 years agomachine/stdarg provides __va* macros, not va* macros, use <stdarg.h> instead
Matthew Dillon [Sun, 9 Nov 2003 18:59:07 +0000 (18:59 +0000)]
machine/stdarg provides __va* macros, not va* macros, use <stdarg.h> instead
of rewriting all the va_list's into __va_list's and such for this contributed
code.

Report-by: David Rhodus <drhodus@catpa.com>
15 years agoFix minor snafu in last commit.
Matthew Dillon [Sun, 9 Nov 2003 18:50:57 +0000 (18:50 +0000)]
Fix minor snafu in last commit.

Report-by: David Rhodus <drhodus@catpa.com>
15 years ago * Remove some __P macros from gnu/usr.bin/
Eirik Nygaard [Sun, 9 Nov 2003 11:41:16 +0000 (11:41 +0000)]
 * Remove some __P macros from gnu/usr.bin/
 * Add some missing $DragonFly$ keywords

15 years agoAdd the -f option to the rpc.umntall call to reduce boot-time stalls when
Matthew Dillon [Sun, 9 Nov 2003 07:31:29 +0000 (07:31 +0000)]
Add the -f option to the rpc.umntall call to reduce boot-time stalls when
remote servers are unreachable.  Add a new rc.conf variable,
rpc_umntall_enable, which defaults to "YES", which may be used to disable
boot-time rpc.umntall operation entirely.

rpc.umntall has caused me headaches ever since it was introduced in FreeBSD
because it could stall a system boot by 60+ seconds per unreachable remote
server in /var/db/mounttab.  This should solve the problem both by reducing
the per-entry stall to around 4-6 seconds, and providing a method by which
the boot-time execution fo the program can be disabled.

15 years agoAdd the -f 'fast timeout' option to rpc.umntall. Using this option will
Matthew Dillon [Sun, 9 Nov 2003 07:11:02 +0000 (07:11 +0000)]
Add the -f 'fast timeout' option to rpc.umntall.  Using this option will
reduce rpc.umntall's resolver and RPC timeouts significantly.

15 years agoAdd a pmap_getport_timeout() call hack that allows rpc.umntall to control
Matthew Dillon [Sun, 9 Nov 2003 07:10:16 +0000 (07:10 +0000)]
Add a pmap_getport_timeout() call hack that allows rpc.umntall to control
pmap_getport()'s portmap timeout.  Otherwise rpc.umntall can hang for up
to 60 seconds per /var/db/mounttab entry during the boot sequence.

15 years agoAdd prototypes for __cmpdi2() and __ucmpdi2(), get rid of compiler warnings.
Matthew Dillon [Sun, 9 Nov 2003 05:15:32 +0000 (05:15 +0000)]
Add prototypes for __cmpdi2() and __ucmpdi2(), get rid of compiler warnings.

15 years agoInitialize base unconditionally to get rid of a bogus compiler warning.
Matthew Dillon [Sun, 9 Nov 2003 02:37:00 +0000 (02:37 +0000)]
Initialize base unconditionally to get rid of a bogus compiler warning.

15 years agoAdd a wmakeenv target for use by the wmakeenv script to aid in debugging
Matthew Dillon [Sun, 9 Nov 2003 02:36:35 +0000 (02:36 +0000)]
Add a wmakeenv target for use by the wmakeenv script to aid in debugging
buildworlds.

15 years agoCore integer types header file reorganization stage 2/2:
Matthew Dillon [Sun, 9 Nov 2003 02:34:03 +0000 (02:34 +0000)]
Core integer types header file reorganization stage 2/2:

Adjust main source files to reflect stdint.h and other changes.  Primarily
this means getting rid of the _BSD_XXX type useage but in some cases,
such as for tar, it means getting rid of #define overrides for intmax_t
and uintmax_t.

15 years agoCore integer types header file reorganization stage 1/2: Create and/or modify
Matthew Dillon [Sun, 9 Nov 2003 02:22:37 +0000 (02:22 +0000)]
Core integer types header file reorganization stage 1/2: Create and/or modify
intttypes.h and stdint.h plus the opaque underlying support in sys/ and
machine/ according to the OpenGroup specifications.

These changes are loosely based on FreeBSD-5 but use far saner type names
and include dependancies.

15 years agoUpdate the systat manual page to reflect the new -ifstat option.
Matthew Dillon [Sat, 8 Nov 2003 19:26:01 +0000 (19:26 +0000)]
Update the systat manual page to reflect the new -ifstat option.

15 years agoAdd -ifstat functionality to systat. It shows the network interfaces and
Jeroen Ruigrok/asmodai [Sat, 8 Nov 2003 09:30:32 +0000 (09:30 +0000)]
Add -ifstat functionality to systat.  It shows the network interfaces and
their respective throughput.

Submitted by: Kenneth Culver <culverk@sweetdreamsracing.biz>

15 years agoNetwork threading stage 1/3: netisrs are already software interrupts,
Matthew Dillon [Sat, 8 Nov 2003 07:57:52 +0000 (07:57 +0000)]
Network threading stage 1/3: netisrs are already software interrupts,
which means they alraedy run in their own thread.  This commit creates
multiple supporting threads for netisrs rather then just one and code
has been added to begin routing packets to particular threads based on
their content.  Eventually this will lead to us being able to isolate and
serialize PCBs in particular threads.  The tail end of the ip_input path's
protocol dispatch, the UIPC (user entry) code, and listen socket have not
been covered yet and still need to be serialized.

A new debugging sysctl, net.inet.ip.mthread_enable, has been added.  It
defaults to 1.  If you set this sysctl 0 netisr processing will revert to
the prior single-threaded behavior.

Submitted-by: Jeffrey Hsu <hsu@FreeBSD.org>
Additional-work-by: dillon
15 years agoDocument critical section and IPIQ interactions in the message port
Matthew Dillon [Sat, 8 Nov 2003 05:38:58 +0000 (05:38 +0000)]
Document critical section and IPIQ interactions in the message port
functions.

15 years agoHopefully do a better job disassembling code in 16 bit mode.
Matthew Dillon [Sat, 8 Nov 2003 03:06:53 +0000 (03:06 +0000)]
Hopefully do a better job disassembling code in 16 bit mode.

15 years agoImport a good chunk of the PNP code from FreeBSD-5.x
Matthew Dillon [Sat, 8 Nov 2003 02:55:19 +0000 (02:55 +0000)]
Import a good chunk of the PNP code from FreeBSD-5.x

15 years agoSynchronize APMBIOS with FreeBSD-5.x bios.c 1.64. The primary change is
Matthew Dillon [Fri, 7 Nov 2003 18:28:53 +0000 (18:28 +0000)]
Synchronize APMBIOS with FreeBSD-5.x bios.c 1.64.  The primary change is
to the PNPATTR_CONFIG_* macros, which are totally different in -current.

15 years agosync from FreeBSD-5.x. No operational changes. Get rid of a .byte macro
Matthew Dillon [Fri, 7 Nov 2003 17:59:23 +0000 (17:59 +0000)]
sync from FreeBSD-5.x.  No operational changes.  Get rid of a .byte macro
and replace with the proper instruction extension.

15 years agoAdd missing $DragonFly$ keywords
Eirik Nygaard [Fri, 7 Nov 2003 14:38:38 +0000 (14:38 +0000)]
Add missing $DragonFly$ keywords

15 years ago * then -> they
Eirik Nygaard [Fri, 7 Nov 2003 13:39:01 +0000 (13:39 +0000)]
 * then -> they
 * Add missing $DragonFly$ keyword

Obtained from: FreeBSD
FreeBSD PR: misc/54967

15 years agoFatal traps were not reporting the correct %cs (code selector) for the SMP
Matthew Dillon [Fri, 7 Nov 2003 06:01:12 +0000 (06:01 +0000)]
Fatal traps were not reporting the correct %cs (code selector) for the SMP
case.  They were reporting the code selector for cpu 0 rather then the cpu
taking the trap.

15 years agoIf a panic occurs from a BIOS call (16 bit mode) or VM86 DDB will attempt
Matthew Dillon [Fri, 7 Nov 2003 06:00:32 +0000 (06:00 +0000)]
If a panic occurs from a BIOS call (16 bit mode) or VM86 DDB will attempt
to disassemble the instruction @ eip.  The problem is that eip is not a
valid KVM address since it is relative to a different %cs selector.  This
commit causes DDB to make appropriate conversions when accessing %eip,
%esp, and %ebp.

15 years agoAdd 3c940 ethernet driver support ('sk' driver) for ASUS K8V (AMD64)
Matthew Dillon [Fri, 7 Nov 2003 05:57:23 +0000 (05:57 +0000)]
Add 3c940 ethernet driver support ('sk' driver) for ASUS K8V (AMD64)
motherboards.

Attributes: This driver was ported from Nathan L. Binkert's OpenBSD driver
by Jung-uk Kim to FreeBSD-4.x.  Jung-uk's port is independant from Stuart
Walsh's work.

15 years ago * Parse arguments with getopt
Eirik Nygaard [Thu, 6 Nov 2003 20:14:24 +0000 (20:14 +0000)]
 * Parse arguments with getopt
 * Add a 'h' flag for usage information

Reviewed by: Matthew Dillon <dillon@apollo.backplane.com>

15 years agoRemove the rest of the __P macros in src/usr.sbin
Eirik Nygaard [Thu, 6 Nov 2003 19:46:42 +0000 (19:46 +0000)]
Remove the rest of the __P macros in src/usr.sbin

15 years ago * Add a missing $DragonFly$ keyword
Eirik Nygaard [Thu, 6 Nov 2003 19:30:05 +0000 (19:30 +0000)]
 * Add a missing $DragonFly$ keyword
 * Remove the rest of the __P macros from src/usr.bin/

15 years agoNuke some more __P macros.
Eirik Nygaard [Thu, 6 Nov 2003 19:09:46 +0000 (19:09 +0000)]
Nuke some more __P macros.

15 years agoAdd another vendor who delivers PL 2303 derived cables/convertors.
Jeroen Ruigrok/asmodai [Thu, 6 Nov 2003 14:36:39 +0000 (14:36 +0000)]
Add another vendor who delivers PL 2303 derived cables/convertors.

15 years agoRemove illegal identifier after #endif.
Jeffrey Hsu [Thu, 6 Nov 2003 05:22:17 +0000 (05:22 +0000)]
Remove illegal identifier after #endif.

15 years agoRemove named arguments in the varsym prototypes which conflict with not very
Matthew Dillon [Wed, 5 Nov 2003 23:56:48 +0000 (23:56 +0000)]
Remove named arguments in the varsym prototypes which conflict with not very
well thought out #define's made in the colldef source.

15 years agoAdd the 'varsym' utility which may be used to manipulate system-wide and
Matthew Dillon [Wed, 5 Nov 2003 23:29:37 +0000 (23:29 +0000)]
Add the 'varsym' utility which may be used to manipulate system-wide and
user-wide variables.  Note that it is not quite complete, it can only set
and retrieve specific variables and cannot yet list the variables.

15 years agoAn additional ui*() API cleanup that I missed.
Matthew Dillon [Wed, 5 Nov 2003 23:27:15 +0000 (23:27 +0000)]
An additional ui*() API cleanup that I missed.

15 years agoVariant symlink support stage 1/2: Implement support for storing and retrieving
Matthew Dillon [Wed, 5 Nov 2003 23:26:21 +0000 (23:26 +0000)]
Variant symlink support stage 1/2: Implement support for storing and retrieving
system-specific, user-specific, and process-specific variables.