19 years ago* Fixup gcc3 build process to use correct install path.
David Rhodus [Tue, 20 Jan 2004 19:31:18 +0000 (19:31 +0000)]
* Fixup gcc3 build process to use correct install path.

19 years agoResident executable support stage 2/4: userland bits. Augment rtld-elf
Matthew Dillon [Tue, 20 Jan 2004 18:46:22 +0000 (18:46 +0000)]
Resident executable support stage 2/4: userland bits.  Augment rtld-elf
to check additional environment variables to trigger registration and
deregistration of a dynamically linked program as a resident binary.
Add a new userland utility, 'resident'.

19 years agoResident executable support stage 1/4: Add kernel bits and syscall support
Matthew Dillon [Tue, 20 Jan 2004 18:41:52 +0000 (18:41 +0000)]
Resident executable support stage 1/4: Add kernel bits and syscall support
for in-kernel caching of vmspace structures.  The main purpose of this
feature is to make it possible to run dynamically linked programs as fast
as if they were statically linked, by vmspace_fork()ing their vmspace and
saving the copy in the kernel, then using that whenever the program is

19 years agoLast commit was completely wrong. Reverting to old revision of file.
Eirik Nygaard [Tue, 20 Jan 2004 16:29:27 +0000 (16:29 +0000)]
Last commit was completely wrong. Reverting to old revision of file.

19 years agoWe don't have the ACPI module, so don't try to load it at boot.
Eirik Nygaard [Tue, 20 Jan 2004 15:30:05 +0000 (15:30 +0000)]
We don't have the ACPI module, so don't try to load it at boot.

Jeroen Ruigrok/asmodai [Tue, 20 Jan 2004 06:03:15 +0000 (06:03 +0000)]

Submitted by: Dave Leimbach <leimySPAM2k@mac.com>

19 years agoUpdate with new source file targets.
Jeroen Ruigrok/asmodai [Tue, 20 Jan 2004 05:58:57 +0000 (05:58 +0000)]
Update with new source file targets.

19 years agoUpdate config.h.
Jeroen Ruigrok/asmodai [Tue, 20 Jan 2004 05:53:42 +0000 (05:53 +0000)]
Update config.h.

19 years agoK&R -> ANSI C conversion.
Jeroen Ruigrok/asmodai [Tue, 20 Jan 2004 05:42:03 +0000 (05:42 +0000)]
K&R -> ANSI C conversion.

19 years agoRetool the M_* flags to malloc() and the VM_ALLOC_* flags to
Matthew Dillon [Tue, 20 Jan 2004 05:04:08 +0000 (05:04 +0000)]
Retool the M_* flags to malloc() and the VM_ALLOC_* flags to
vm_page_alloc(), and vm_page_grab() and friends.

The M_* flags now have more flexibility, with the intent that we will start
using some of it to deal with NULL pointer return problems in the codebase
(CAM is especially bad at dealing with unexpected return values).  In
particular, add M_USE_INTERRUPT_RESERVE and M_FAILSAFE, and redefine
M_NOWAIT as a combination of M_ flags instead of its own flag.

The VM_ALLOC_* macros are now flags (0x01, 0x01, 0x04) rather then states
(1, 2, 3), which allows us to create combinations that the old interface
could not handle.

19 years agoFix a panic if -i is used on an interface which does not have an IP.
Matthew Dillon [Tue, 20 Jan 2004 00:54:09 +0000 (00:54 +0000)]
Fix a panic if -i is used on an interface which does not have an IP.

Submitted-by: Kent Ibbetson <bsd@kibbet.com>
19 years agoUpdate for the new version of CVS.
Jeroen Ruigrok/asmodai [Mon, 19 Jan 2004 11:03:01 +0000 (11:03 +0000)]
Update for the new version of CVS.

19 years agoAdd and document an example disklabel file for the ISO
Matthew Dillon [Sun, 18 Jan 2004 19:13:10 +0000 (19:13 +0000)]
Add and document an example disklabel file for the ISO

19 years agoFix a minor malloc leak in ips.
Matthew Dillon [Sun, 18 Jan 2004 18:47:31 +0000 (18:47 +0000)]
Fix a minor malloc leak in ips.

Obtained-from: Ruslan Ermilov <ru@freebsd.org>
Obtained-via: [CHECKER] bugs in FreeBSD thread

19 years agomove the caps_type enum so it is accessible through both user and kernel
Matthew Dillon [Sun, 18 Jan 2004 12:50:15 +0000 (12:50 +0000)]
move the caps_type enum so it is accessible through both user and kernel

19 years agoAdd test programs for the new caps system calls. Temporarily disable the
Matthew Dillon [Sun, 18 Jan 2004 12:39:58 +0000 (12:39 +0000)]
Add test programs for the new caps system calls.  Temporarily disable the
old caps junk in libcaps (it needs to be retargeted to the new system calls).

Note: performance is not expected to be very good at the moment.

19 years agovm_uiomove() is a VFS_IOOPT related procedure, conditionalize it
Matthew Dillon [Sun, 18 Jan 2004 12:32:04 +0000 (12:32 +0000)]
vm_uiomove() is a VFS_IOOPT related procedure, conditionalize it

19 years agoCAPS IPC library stage 2/3: Adjust syscalls.master and regenerate our
Matthew Dillon [Sun, 18 Jan 2004 12:31:09 +0000 (12:31 +0000)]
CAPS IPC library stage 2/3: Adjust syscalls.master and regenerate our
system calls.

19 years agoCAPS IPC library stage 1/3: The core CAPS IPC code, providing system calls
Matthew Dillon [Sun, 18 Jan 2004 12:29:50 +0000 (12:29 +0000)]
CAPS IPC library stage 1/3: The core CAPS IPC code, providing system calls
to create and connect to named rendezvous points.  The CAPS interface
implements a many-to-1 (client:server) capability and is totally self
contained.  The messaging is designed to support single and multi-threading,
synchronous or asynchronous (as of this commit: polling and synchronous only).

Message data is 100% opaque and so while the intention is to integrate it into
a userland LWKT messaging subsystem, the actual system calls do not depend
on any LWKT structures.

Since these system calls are experiemental and may contain root holes,
they must be enabled via the sysctl kern.caps_enabled.

19 years agoFix reversed snprintf arguments.
Matthew Dillon [Sun, 18 Jan 2004 03:28:29 +0000 (03:28 +0000)]
Fix reversed snprintf arguments.

19 years ago* Starting using GCCVER when needed and other things
David Rhodus [Sat, 17 Jan 2004 23:05:20 +0000 (23:05 +0000)]
* Starting using GCCVER when needed and other things
to reflect build changess currently in progress.

19 years ago* Drop the directory outline for building gcc3.
David Rhodus [Sat, 17 Jan 2004 22:40:16 +0000 (22:40 +0000)]
*       Drop the directory outline for building gcc3.

        This is not ready to be used yet as everything needs to
        be reworked to install in the new compiler location.

19 years agoFix an off-by-one error in fdfree() related to flock/fcntl unlock on
Matthew Dillon [Sat, 17 Jan 2004 21:23:38 +0000 (21:23 +0000)]
Fix an off-by-one error in fdfree() related to flock/fcntl unlock on
process exit.

Originally-from: FreeBSD fd code by DES.
Submitted-by: Skip Ford <skip.ford@verizon.net>
19 years ago* Fix libcaps build by syncing up with kernel work.
David Rhodus [Sat, 17 Jan 2004 17:27:54 +0000 (17:27 +0000)]
* Fix libcaps build by syncing up with kernel work.

Reported by: Eirik Nygaard <eirikn@kerneled.com>

19 years agonon operational change. vm_map_wire() now takes a flags argument instead
Matthew Dillon [Sat, 17 Jan 2004 03:26:18 +0000 (03:26 +0000)]
non operational change.  vm_map_wire() now takes a flags argument instead
of a boolean, so pass 0 instead of FALSE.

19 years agoHandle recursive situations a bit more robustly by adding a second reference
Matthew Dillon [Sat, 17 Jan 2004 03:24:50 +0000 (03:24 +0000)]
Handle recursive situations a bit more robustly by adding a second reference
to the linker_file_t during linker_file_unload(), and not looking up the
'next' module in the unload loop until after unloading (but not yet
releasing) the current module.

19 years agoFix PCI deadlock on boot
Joerg Sonnenberger [Fri, 16 Jan 2004 20:21:42 +0000 (20:21 +0000)]
Fix PCI deadlock on boot

19 years agoAdjust the upgrade target to remove stale /usr/libexec/aout files now
Matthew Dillon [Fri, 16 Jan 2004 19:57:30 +0000 (19:57 +0000)]
Adjust the upgrade target to remove stale /usr/libexec/aout files now
that /usr/libexec/gcc2/aout is being generated properly.

19 years agoFixup /usr/libexec/gcc2/aout binutils generation. The install targets had
Matthew Dillon [Fri, 16 Jan 2004 19:55:52 +0000 (19:55 +0000)]
Fixup /usr/libexec/gcc2/aout binutils generation.  The install targets had
to be updated for the /usr/libexec/aout->/usr/libexec/gcc2/aout move.

19 years agoMake sure cvs reports the proper OS.
Jeroen Ruigrok/asmodai [Fri, 16 Jan 2004 14:13:50 +0000 (14:13 +0000)]
Make sure cvs reports the proper OS.

19 years agoFix compile errors introduced with last commit
Joerg Sonnenberger [Fri, 16 Jan 2004 13:07:18 +0000 (13:07 +0000)]
Fix compile errors introduced with last commit

19 years agoAugment the upgrade_etc target to remove stale compiler-related binaries
Matthew Dillon [Fri, 16 Jan 2004 09:11:10 +0000 (09:11 +0000)]
Augment the upgrade_etc target to remove stale compiler-related binaries
and data files if it detects that the gcc upgrade has occured from a
recent installworld.

19 years agoMajor GCC surgery. Move most compiler-specific files into named
Matthew Dillon [Fri, 16 Jan 2004 07:45:22 +0000 (07:45 +0000)]
Major GCC surgery.  Move most compiler-specific files into named
subdirectories and do a major overhaul of the front-end binaries in /usr/bin.

    /usr/libdata/gcc -> /usr/libdata/gcc2
    /usr/libdata/ldscripts -> /usr/libdata/gcc2/ldscripts
    /usr/libexec/{all_gcc_bins} -> /usr/libexec/gcc2/*
    /usr/libexec/{elf,aout}/* -> /usr/libexec/gcc2/{elf,aout}/*

OBJFORMAT_PATH has been changed from a full path to a base path, because
the objformat binary (hardlinked to most compiler related binaries in
/usr/bin) must now interpret the command name and use one of two different
paths to find the actual binary.  Previously certain gcc binaries, such as
'cc' and 'cpp', were directly installed in /usr/bin.  That is no longer the

Objformat now supports the GCCVER environment variable for vectoring the
compiler version.  This will be used to support gcc3 and other compilers.

19 years agoscrap stderr from the ps output to avoid an annoying warning (due to
Matthew Dillon [Fri, 16 Jan 2004 07:11:23 +0000 (07:11 +0000)]
scrap stderr from the ps output to avoid an annoying warning (due to
the DEB database not having been constructed yet).  It's a chicken and
egg problem so we can't reorder the file, but ps works anyway and
accomplishes its purpose of supplying data to initialize the random
number generator.

19 years agoReplace pci_cfgread and pci_cfgwrite with PCIB_READ_CONFIG and
Joerg Sonnenberger [Thu, 15 Jan 2004 21:18:18 +0000 (21:18 +0000)]
Replace pci_cfgread and pci_cfgwrite with PCIB_READ_CONFIG and

Merged in FreeBSD rev 1.167, without 1.162 and 1.166.

19 years agoAdd comment for nexus_pcib_write_config.
Joerg Sonnenberger [Thu, 15 Jan 2004 20:45:09 +0000 (20:45 +0000)]
Add comment for nexus_pcib_write_config.

19 years agoUse nexus_pcib_read_config instead of pci_cfgread. Do some cleanup.
Joerg Sonnenberger [Thu, 15 Jan 2004 20:41:57 +0000 (20:41 +0000)]
Use nexus_pcib_read_config instead of pci_cfgread. Do some cleanup.

19 years agoRemove HOSE support which should be implemented in the bus function when
Joerg Sonnenberger [Thu, 15 Jan 2004 20:35:06 +0000 (20:35 +0000)]
Remove HOSE support which should be implemented in the bus function when
Alpha support is re-enabled.
Add BUS pcib ivar.
Add pcib interface functions.

19 years agominor syntax cleanups (non-operational changes).
Matthew Dillon [Thu, 15 Jan 2004 20:17:36 +0000 (20:17 +0000)]
minor syntax cleanups (non-operational changes).

19 years agoAdd pcib interface methods.
Joerg Sonnenberger [Thu, 15 Jan 2004 19:58:30 +0000 (19:58 +0000)]
Add pcib interface methods.
Add device to catch the PCI bridges to stop them showing up twice.
Add black hole device for the PCI bus PnP ID.

19 years agoAdd pcib_if.m
Joerg Sonnenberger [Thu, 15 Jan 2004 18:22:22 +0000 (18:22 +0000)]
Add pcib_if.m

19 years ago* Add in 'device ips' to the LINT kernel config.
David Rhodus [Thu, 15 Jan 2004 16:20:06 +0000 (16:20 +0000)]
* Add in 'device ips' to the LINT kernel config.

19 years ago* Add in ips.4 to the Makefile so it gets installed
David Rhodus [Thu, 15 Jan 2004 15:53:19 +0000 (15:53 +0000)]
* Add in ips.4 to the Makefile so it gets installed

Sent in by: YONETANI Tomokazu <ghwt+dragonfly-kernel@les.ath.cx>

19 years ago* Change SUBDIR sort order.
David Rhodus [Thu, 15 Jan 2004 15:42:51 +0000 (15:42 +0000)]
* Change SUBDIR sort order.

19 years ago* Add in support for the IBM ServeRAID controller.
David Rhodus [Thu, 15 Jan 2004 15:41:23 +0000 (15:41 +0000)]
* Add in support for the IBM ServeRAID controller.

Port done and sent in by:
TONETANI Tomokazu <ghwt+dragonfly-kernel@les.ath.cx>

19 years agoFix a long-standing bug in protocol 2 operation. The client will top sending
Matthew Dillon [Thu, 15 Jan 2004 12:03:00 +0000 (12:03 +0000)]
Fix a long-standing bug in protocol 2 operation.  The client will top sending
window updates to the server if and output channel fails.  Output channels
often fail when pipes fail or the filesystem becomes full.  If the server has
a great deal more data to send it will exhaust its window and stall

This reproduces the problem:

limit filesize 64k
ssh remotebox -n cat /usr/share/dict/words | cat > junkfile

19 years agoFix linker issues with /usr/libexec/elf/ld not using rtld's search path
Joerg Sonnenberger [Thu, 15 Jan 2004 11:59:27 +0000 (11:59 +0000)]
Fix linker issues with /usr/libexec/elf/ld not using rtld's search path

19 years agoSync pci_cfgreg.c with FreeBSD 5, rev. 1.101. This makes the PCI interrupt
Joerg Sonnenberger [Thu, 15 Jan 2004 08:05:41 +0000 (08:05 +0000)]
Sync pci_cfgreg.c with FreeBSD 5, rev. 1.101. This makes the PCI interrupt
routing code more robust. Also copied pci_cfgreg.h into bus/pci/i386, the
other instance in machine/pci_cfgreg.h will go later.

19 years agonpx_intr() expects an interrupt frame but was given something inbetween an
Matthew Dillon [Thu, 15 Jan 2004 00:03:08 +0000 (00:03 +0000)]
npx_intr() expects an interrupt frame but was given something inbetween an
interrupt frame and a trap frame, causing a panic.  Save/restore %ebx
(the CPL) just like the other entry points in this file do, push the
two 32 bit words required to convert the trap frame into an interrupt
frame, and clean up the frame on return for the jump to doreti.

Reported-by: David Rhodus <drhodus@catpa.com>
19 years agoCleanup the vm_map_entry_[k]reserve/[k]release() API. This API is used to
Matthew Dillon [Wed, 14 Jan 2004 23:26:14 +0000 (23:26 +0000)]
Cleanup the vm_map_entry_[k]reserve/[k]release() API.  This API is used to
guarentee that sufficient vm_map_entry structures are available for certain
atomci VM operations.

The kreserve/krelease API is only supposed to be used to dig into the kernel
reserve, used when zalloc() must recurse into kmem_alloc() in order to
allocate a new page.  Without this we can get into a kmem_alloc -> zalloc ->
kmem_alloc deadlock.

kreserve/krelease was being used improperly in my original work, causing it
to be unable to guarentee the reserve and resulting in an occassional panic.
This commit converts the improper usage back to using the non-k version of
the API and (should) properly handle the zalloc() recursion case.

Reported-by: David Rhodus <drhodus@catpa.com>
19 years agoDrop chip driver and merge the functionality into pci_probe_nomatch.
Joerg Sonnenberger [Wed, 14 Jan 2004 18:20:19 +0000 (18:20 +0000)]
Drop chip driver and merge the functionality into pci_probe_nomatch.
Adjust return value of pcib_probe to -1000 for conformance to other
default matches. Do some general cleanup.

19 years agoFix indentation to tabs, no functional changes
Joerg Sonnenberger [Wed, 14 Jan 2004 18:03:05 +0000 (18:03 +0000)]
Fix indentation to tabs, no functional changes

19 years agoAdd black hole device for system PnP IDs
Joerg Sonnenberger [Wed, 14 Jan 2004 07:16:37 +0000 (07:16 +0000)]
Add black hole device for system PnP IDs

19 years agoMake hw.firewire.sbp.tags tunable
Joerg Sonnenberger [Wed, 14 Jan 2004 07:13:27 +0000 (07:13 +0000)]
Make hw.firewire.sbp.tags tunable

19 years agoAdd a missing thread pointer to a busdma call that needs it.
Matthew Dillon [Wed, 14 Jan 2004 05:30:57 +0000 (05:30 +0000)]
Add a missing thread pointer to a busdma call that needs it.

Reported-by: David Rhodus <drhodus@machdep.com>
19 years ago* Use id(1) instead of grep(1) to detect the presence of the smmsp
David Rhodus [Wed, 14 Jan 2004 03:55:36 +0000 (03:55 +0000)]
* Use id(1) instead of grep(1) to detect the presence of the smmsp
user/group. This fixes the check for users with smmsp in NIS
instead of their local files.

Idea taken from FreeBSD

19 years agoAdd rman_get_device and rman_get_size, use macros in nexus.c
Joerg Sonnenberger [Tue, 13 Jan 2004 18:45:37 +0000 (18:45 +0000)]
Add rman_get_device and rman_get_size, use macros in nexus.c

19 years agoAdd PCIBUS to nexus
Joerg Sonnenberger [Tue, 13 Jan 2004 18:31:58 +0000 (18:31 +0000)]
Add PCIBUS to nexus

19 years agoAdd hw.firewire.sbp.tags to control tagging for SBP devices. The default
Joerg Sonnenberger [Tue, 13 Jan 2004 17:32:12 +0000 (17:32 +0000)]
Add hw.firewire.sbp.tags to control tagging for SBP devices. The default
behaviour was changed to disable tagged command queues, which is safer since
not all firewire chips support TCQ.

19 years agoANSIfy procedure arguments.
Matthew Dillon [Tue, 13 Jan 2004 08:22:12 +0000 (08:22 +0000)]
ANSIfy procedure arguments.

19 years ago* Perform some man page maintenance bringing the miibus related
David Rhodus [Tue, 13 Jan 2004 01:48:59 +0000 (01:48 +0000)]
* Perform some man page maintenance bringing the miibus related
pages up to date with current usage

* Minor cleanup applied to kue.4 while here.

Sent in by: Christian Brueffer <chris@unixpages.org>

19 years ago* Update so as to reflect structure name changes to upcall.h
David Rhodus [Mon, 12 Jan 2004 16:48:37 +0000 (16:48 +0000)]
* Update so as to reflect structure name changes to upcall.h

19 years agoMinor corrections to the documentation.
Matthew Dillon [Mon, 12 Jan 2004 06:54:09 +0000 (06:54 +0000)]
Minor corrections to the documentation.

Submitted-by: Miguel Mendez <flynn@energyhq.es.eu.org>
19 years agoSplit off the PCCARD specific driver parts of fd and sio and remove last
Joerg Sonnenberger [Sun, 11 Jan 2004 16:45:17 +0000 (16:45 +0000)]
Split off the PCCARD specific driver parts of fd and sio and remove last
uses of NCARD and use_card.h. The header will go with the NEWCARD merge.

19 years agoArg3 to kern_fcntl was incorrectly passed as NULL, causing
Matthew Dillon [Fri, 9 Jan 2004 21:49:30 +0000 (21:49 +0000)]
Arg3 to kern_fcntl was incorrectly passed as NULL, causing
a panic.

Submitted-by: Andrew Atrens <atrens@nortelnetworks.com>
19 years ago* Remove HTT option from kernel config files.
David Rhodus [Fri, 9 Jan 2004 20:52:05 +0000 (20:52 +0000)]
* Remove HTT option from kernel config files.

19 years ago* Remove the HTT option from the kernel as we can now
David Rhodus [Fri, 9 Jan 2004 20:49:39 +0000 (20:49 +0000)]
*       Remove the HTT option from the kernel as we can now
pickup the BIOS option if you want to use the logical

You will still need to compile your kernel with
options        SMP
options        APIC_IO

Because the logical cpu's for the most part still act
like extra processors even though this is not true.

The idea is taken from JHB's changes in FreeBSD but without
the idle loop changes so as not to get the "Hyerthreading
slowdown" affect FreeBSD seems to have with HTT.

19 years ago* Don't install the freefall gnats files into /etc as
David Rhodus [Fri, 9 Jan 2004 20:25:13 +0000 (20:25 +0000)]
* Don't install the freefall gnats files into /etc as
they are useless.

19 years ago* Add usb_mem.c back into the build process so the usb module
David Rhodus [Fri, 9 Jan 2004 16:46:42 +0000 (16:46 +0000)]
* Add usb_mem.c back into the build process so the usb module
doesn't have undefined symbols.

Sent in by: YONETANI Tomokazu <qhwt+dragonfly-commits@les.ath.cx>

19 years agoSynchronise partially with NetBSD's v1.85:
Jeroen Ruigrok/asmodai [Thu, 8 Jan 2004 19:00:26 +0000 (19:00 +0000)]
Synchronise partially with NetBSD's v1.85:

update location of documentation

19 years agoSynchronise partially with NetBSD's umodem.c v1.46:
Jeroen Ruigrok/asmodai [Thu, 8 Jan 2004 18:56:20 +0000 (18:56 +0000)]
Synchronise partially with NetBSD's umodem.c v1.46:

update the URLs for the documentation.

19 years agoSpell 'weird' the way English expects it.
Jeroen Ruigrok/asmodai [Thu, 8 Jan 2004 18:48:07 +0000 (18:48 +0000)]
Spell 'weird' the way English expects it.

19 years agoSpell 'separate' and its siblings the way it is supposed to.
Jeroen Ruigrok/asmodai [Thu, 8 Jan 2004 18:39:19 +0000 (18:39 +0000)]
Spell 'separate' and its siblings the way it is supposed to.

19 years agoGet rid of PZERO. This was removed about the first of August.
Jeroen Ruigrok/asmodai [Thu, 8 Jan 2004 18:12:59 +0000 (18:12 +0000)]
Get rid of PZERO.  This was removed about the first of August.
It probably compiled due to the preprocessor defining code out.

19 years agoMake sure the vendor identifier matches the right project. The binutils
Jeroen Ruigrok/asmodai [Thu, 8 Jan 2004 17:22:33 +0000 (17:22 +0000)]
Make sure the vendor identifier matches the right project.  The binutils
folks want this.

19 years ago* Merge in the copyright that DragonFly is being distributed under.
David Rhodus [Thu, 8 Jan 2004 17:10:08 +0000 (17:10 +0000)]
* Merge in the copyright that DragonFly is being distributed under.

Idea taken from FreeBSD.

19 years agoMake sure we identify our toolchain as DragonFly, not FreeBSD. This is
Jeroen Ruigrok/asmodai [Thu, 8 Jan 2004 13:22:58 +0000 (13:22 +0000)]
Make sure we identify our toolchain as DragonFly, not FreeBSD.  This is
required by the GCC and binutils folks.

19 years agoAdd card_if.h dependency
Joerg Sonnenberger [Thu, 8 Jan 2004 10:19:48 +0000 (10:19 +0000)]
Add card_if.h dependency

19 years agoAdd/uncondionalize the sixt argument of set_memory_offset to ease the migration
Joerg Sonnenberger [Thu, 8 Jan 2004 10:06:29 +0000 (10:06 +0000)]
Add/uncondionalize the sixt argument of set_memory_offset to ease the migration
to the FreeBSD-5 cardbus framework.

19 years agoMake the phase synchronization of the hz clock interrupt (I8254 timer0)
Matthew Dillon [Thu, 8 Jan 2004 08:11:12 +0000 (08:11 +0000)]
Make the phase synchronization of the hz clock interrupt (I8254 timer0)
to the timecounter more generic.  This will work with all time counters
as long as the 8254's crystal isn't to terribly off, but it could take a
few minutes for the computer to lock the phase after boot.  I'm being
conservative here and do not want to skew the clock interrupt too much.

Tested by: Paul Herman <pherman@frenchfries.net>

19 years agoAdd necessary critical sections to microtime() and nanotime().
Matthew Dillon [Wed, 7 Jan 2004 20:21:46 +0000 (20:21 +0000)]
Add necessary critical sections to microtime() and nanotime().

19 years agoFix a bug introduced in the last commit. When calculating the delta count
Matthew Dillon [Wed, 7 Jan 2004 20:21:20 +0000 (20:21 +0000)]
Fix a bug introduced in the last commit.  When calculating the delta count
from the 8254 we have to use timer0_max_count + 1 instead of timer0_max_count
because our frequency correction may load timer0_max_count + 1.

Implement clkintr_pending in the FAST_INTR path as well as the normal INTR

19 years agoMove the FreeBSD 2.2 and 3.x PCI compatibility code into pci_compat.c and let it
Joerg Sonnenberger [Wed, 7 Jan 2004 18:13:19 +0000 (18:13 +0000)]
Move the FreeBSD 2.2 and 3.x PCI compatibility code into pci_compat.c and let it
depend on COMPAT_OLDPCI. Adjust LINT to accordingly.

19 years agonote last commit based on evidence supplied by: Paul Herman <pherman@frenchfries...
Matthew Dillon [Wed, 7 Jan 2004 11:08:06 +0000 (11:08 +0000)]
note last commit based on evidence supplied by: Paul Herman <pherman@frenchfries.net>

19 years agotvtohz() was originally designed for tsleep() and timeout() operations but
Matthew Dillon [Wed, 7 Jan 2004 11:07:04 +0000 (11:07 +0000)]
tvtohz() was originally designed for tsleep() and timeout() operations but
it is also used to time nanosleep() ops.  The problem is that in order to
compensate for the fact that a clock interrupt might occur just after a
thread blocks or registers a timeout, this function effectively added +1
to the returned value plus added another +1 for timeouts that were not
integer multiples if the clock interrupt frequency.

Split tvtohz() into two routines: tvtohz_low() and tvtohz_high().
tvtohz_low() does not do any compensation, tvtohz_high() does.

Add the kern.sleep_hardloop sysctl, which defaults to 0 (off).  If set to
1 this will cause nanosleep() to attempt to time exactly the requested
interval (which could cost more cpu) rather then rounding it off to a
multiple of hz.  If set to 2 nanosleep() will only do the more rigid
timing for requests less then 1 second.   Also change the normal hz-baesd
case to only compensate by +1, not +2, in order to improve accuracy.

19 years agoCompensate for the frequency error that occurs at higher 'hz' settings.
Matthew Dillon [Wed, 7 Jan 2004 10:59:09 +0000 (10:59 +0000)]
Compensate for the frequency error that occurs at higher 'hz' settings.
e.g. by default at 100hz the 8254 running at 1193182Hz needs
a count load of 11931.82, but we can only load integer values so the
clock interrupt winds up being slightly slower or faster then 100hz.
This will fix phase creep in things like nanosleep().

The problem is solved by keeping track of the fractional error and
adjusting the counter load register for the following interrupt.

Report-by: Paul Herman <pherman@frenchfries.net>
19 years ago*** empty log message ***
Matthew Dillon [Wed, 7 Jan 2004 10:54:57 +0000 (10:54 +0000)]
*** empty log message ***

19 years agobktr depends on bktr_mem. Add a KMODDEPS line.
Matthew Dillon [Wed, 7 Jan 2004 03:15:01 +0000 (03:15 +0000)]
bktr depends on bktr_mem.  Add a KMODDEPS line.

Reported-by: Adam K Kirchhoff <adamk@voicenet.com>
19 years ago * Nuke calendar.freebsd
Eirik Nygaard [Tue, 6 Jan 2004 20:26:38 +0000 (20:26 +0000)]
 * Nuke calendar.freebsd

19 years agoAdd PCI identifier to match against a Dell OEM version of the SB Live!
Jeroen Ruigrok/asmodai [Tue, 6 Jan 2004 16:31:55 +0000 (16:31 +0000)]
Add PCI identifier to match against a Dell OEM version of the SB Live!

19 years agoAdd support for SoundBlaster Audigy and Audigy 2.
Jeroen Ruigrok/asmodai [Tue, 6 Jan 2004 16:07:41 +0000 (16:07 +0000)]
Add support for SoundBlaster Audigy and Audigy 2.

Based on patches by Orlando Bassotto, which were taken from the ALSA Project
and the SoundBlaster OSS repository.

19 years ago * Add devname_r(3) function, which takes a buffer and buffer length as
Eirik Nygaard [Tue, 6 Jan 2004 15:38:09 +0000 (15:38 +0000)]
 * Add devname_r(3) function, which takes a buffer and buffer length as

19 years ago * Default to a calendar file that actually exists (calendar.all)
Eirik Nygaard [Tue, 6 Jan 2004 15:29:09 +0000 (15:29 +0000)]
 * Default to a calendar file that actually exists (calendar.all)

19 years agoSynch up with FreeBSD 5 with clean up changes.
Jeroen Ruigrok/asmodai [Tue, 6 Jan 2004 08:35:42 +0000 (08:35 +0000)]
Synch up with FreeBSD 5 with clean up changes.
-h option added (for help)
Relative volume values are now also supported.

Submitted by: Craig Dooley <craig@xlnx-x.net>

19 years agoAdd the -r option to set the hostname based on a reverse lookup of an IP
Matthew Dillon [Tue, 6 Jan 2004 08:29:34 +0000 (08:29 +0000)]
Add the -r option to set the hostname based on a reverse lookup of an IP
address, the -i option to set the hostname based on a reverse lookup of
an interface's primary IP address, and -6 and -4 to select an interface's
IPV4 or IPV6 address to run the reverse on.

Submitted-by: Kent Ibbetson <bsd@kibbet.com>
19 years agoif_xname support Part 2b/2: Convert remaining netif devices and implement full
Matthew Dillon [Tue, 6 Jan 2004 03:21:18 +0000 (03:21 +0000)]
if_xname support Part 2b/2: Convert remaining netif devices and implement full
support for if_xname.  Restructure struct ifnet in net/if_var.h, pulling in
a few minor additional changes from current including making if_dunit an int,
and making if_flags an int.

Submitted-by: Max Laier <max@love2party.net>
19 years agoif_xname support Part 2/2: Convert remaining netif devices and implement full
Matthew Dillon [Tue, 6 Jan 2004 03:17:28 +0000 (03:17 +0000)]
if_xname support Part 2/2: Convert remaining netif devices and implement full
support for if_xname.  Restructure struct ifnet in net/if_var.h, pulling in
a few minor additional changes from current including making if_dunit an int,
and making if_flags an int.

Submitted-by: Max Laier <max@love2party.net>
19 years agoif_xname support Part 1/2: Convert most of the netif devices to use
Matthew Dillon [Tue, 6 Jan 2004 01:40:51 +0000 (01:40 +0000)]
if_xname support Part 1/2: Convert most of the netif devices to use

Submitted-by: Max Laier <max@love2party.net>
19 years agoMaintain the fnmatch() API from FreeBSD-5 using an inline, rename the
Matthew Dillon [Tue, 6 Jan 2004 01:05:52 +0000 (01:05 +0000)]
Maintain the fnmatch() API from FreeBSD-5 using an inline, rename the
core fnmatch procedure to _fnmatch, and add a nesting count to it to avoid
stack overflows.  Also cleanup the syntax (mainly add braces and ansification).

19 years agoImport the libkern/fnmatch code from FreeBSD-5.
Matthew Dillon [Tue, 6 Jan 2004 00:56:49 +0000 (00:56 +0000)]
Import the libkern/fnmatch code from FreeBSD-5.

Submitted-by: Max Laier <max@love2party.net>