Matt Jacob [Sun, 10 Dec 2006 03:41:48 +0000 (03:41 +0000)]
Remove dependency on ispfw and firmware as modules.
Either they're there early and the ispfw sets have
registered themselves, or they're not.
The module dependency stuff isn't quite what we want
anyway. If the user doesn't want the load placed on
system memory by loading the firmware, they don't
specify it to be loaded (either by being linked in
or via being a module to be loaded and then hooked
in with firmware(9)). It doesn't then make sense to
then override what they want by pulling it in anyway.
This might be able to work if we were able to pull in
just exactly what we needed for the card we have- but
that's an optimization left for the future.
Kip Macy [Sun, 10 Dec 2006 01:52:46 +0000 (01:52 +0000)]
Add hw.physmemstart loader variable to enable the user to specify the address
at which the kernel should start allocating physical memory. The primary
purpose of this is to test 64-bit cleanness of the data path by setting
hw.physmemstart=4G so that all physical allocations are above 4GB. AMD64
and i386/PAE could also benefit from having this option.
Warner Losh [Sun, 10 Dec 2006 01:10:08 +0000 (01:10 +0000)]
As Bernd Walter points out, the rlphy is used for more things than
just the intenral phy on parts supported by the rl and re drivers, the
RTL8201BL for example. He also sent me a nice picture of hundreds of
these chips in a tray to boulder his claim. :-) Therefore remove a
comment that suggested that they were...
Kip Macy [Sat, 9 Dec 2006 23:11:30 +0000 (23:11 +0000)]
Fix handling of the hw.physmem loader variable use real_phys_avail[] which
is already bounded by hw.physmem to calculate phys_avail[] - previously only
real_phys_avail[] was being bound by hw.physmem so we were allocating memory
that wasn't mapped in the direct map
- If the source file has its immutable or append-only flag set, link(2)
returns EPERM.
- If the parent directory of the destination file has its immutable flag set,
link(2) returns EPERM.
Instead of explicitly initializing variables to avoid compiler warnings,
add a default case to handle the situation when the variables are not
initialized.
Furthermore, abort() if the snmp agent passes an invalid option to the
bridge module. As the option (SET, GET, GETNEXT, COMMIT, ROLLBACK) is
determined by the snmp agent based on the operation requested by user,
this behaviour is unlikely to be abused as a source for a DoS, but if
ever hit will likely reveal a problem in the snmp agent or bridge
module.
- If the directory to be removed has its immutable, undeletable or append-only
flag set, rmdir(2) returns EPERM.
- If the parent directory of the directory to be removed has its immutable or
append-only flag set, rmdir(2) returns EPERM.
- If the parent directory of the file pointed at by the from argument has its
immutable or append-only flag set, rename(2) returns EPERM.
- If the parent directory of the file pointed at by the to argument has its
immutable flag set, rename(2) returns EPERM.
Kip Macy [Sat, 9 Dec 2006 05:22:22 +0000 (05:22 +0000)]
- remove restriction on OFW kernel allocations being 4M
- shuffle memory range following kernel to the beginning of phys_avail
- have the direct area use 256MB pages where possible
- remove dead code from the end of pmap_bootstrap
- have pmap_alloc_contig_pages check all memory ranges in phys_avail before
giving up
- informal benchmarking indicates a ~5% speedup on buildworld
Greg Lehey [Sat, 9 Dec 2006 02:27:45 +0000 (02:27 +0000)]
Set channel utility for Hauuapuge PVR-250 and PVR-350.
This s part of an import of the PVR-250 driver. Originally it was
calleed pvr250-setchannel, but it seems better to improve this program
to work for any tuner card, so I'm starting with a more generic name.
That shouldn't mislead anybody: currently the program only works with
the (yet to be committed) cxm driver.
Craig Rodrigues [Sat, 9 Dec 2006 01:49:19 +0000 (01:49 +0000)]
Minor cleanup. If we are doing a mount update, and we pass in
an "export" flag indicating that we are trying to NFS export the
filesystem, and the MSDOSFS_LARGEFS flag is set on the filesystem,
then deny the mount update and export request. Otherwise,
let the full mount update proceed normally.
MSDOSFS_LARGES and NFS don't mix because of the way inodes are calculated
for MSDOSFS_LARGEFS.
Julian Elischer [Fri, 8 Dec 2006 23:44:30 +0000 (23:44 +0000)]
Explicitly emphasize a facet of m_pullup() that some people seem to
frequently forget. i.e. that you can not keep using pointers to
within the old chain.
Ruslan Ermilov [Fri, 8 Dec 2006 21:50:48 +0000 (21:50 +0000)]
Document the following change in behavior:
: fdisk.c revision 1.74
: date: 2004/06/14 07:21:19; author: phk; state: Exp; lines: +3 -3
: Make fdisk initialize the first instead of the last slice by default.
Hiroki Sato [Fri, 8 Dec 2006 15:48:42 +0000 (15:48 +0000)]
Disable IPv6 configuration for interfaces in pccard_ether_start().
After a change of devd.conf, devd(8) handles NIC attach/detach event
by using /etc/pccard_ether with the interface name as the argument.
This model does not work properly with IPv6 configuration because the
implementation of IPv6 stateless auto-configuration in the FreeBSD
rc.d scripts depends on whether there are any explicit configurations
for interfaces or not. It works this way: if no manual configuration,
it will perform auto-configuration, but otherwise no
auto-configuration will be performed. So, this behavior can only be
determined by all of the interfaces on a system, not a single one.
For this reason, the network6_interface_setup() function called from
the pccard_ether_start() does not work with a single interface name.
And what is worse, this combination of devd.conf and
pccard_ether_start() caused a bad side-effect that when
ipv6_enable=YES, all of interfaces marked as DOWN would be UP
unconditionally (and router solicitation was sent) just after devd(8)
was invoked. This should be fixed in a more sophisticated way.
Luigi Rizzo [Fri, 8 Dec 2006 10:36:45 +0000 (10:36 +0000)]
Fix an oscure bug triggered by a recent change in kern_socket.c.
The symptoms were that outgoing DHCP requests for diskless kernels
had the IP header corrupt. After long investigations, the source of
the problem was found in ether_output() - for SIMPLEX interfaces
and broadcast traffic, a copy of the packet is passed back to the kernel
through if_simloop(). However if_simloop() modifies the mbuf, while
the copy obtained through m_copym() is a readonly one.
The bug has been there forever, but it has been triggered only recently
by a change in sosend_dgram() which passed down mbufs with sufficient
space to prepend the header.
This fix is trivial - use m_dup() instead of m_copy() to create
the copy. As an alternative, we could try and modify if_simloop()
to play safely with readonly mbufs, but i don't think it is worthwhile
because 1) this is a relatively infrequent code path so we do not need
to worry too much about performance, and 2) the cost of doing an
extra m_pullup in if_simloop() is probably the same as doing the
copy of the cluster, anyways.
Kip Macy [Fri, 8 Dec 2006 08:44:47 +0000 (08:44 +0000)]
Remove the requirement that phys_avail be sorted in ascending order
by explicitly finding the lowest and highest addresses when calculating
the size of the vm_pages array
Tim Kientzle [Fri, 8 Dec 2006 07:43:53 +0000 (07:43 +0000)]
The ISO9660 spec does allow files up to 4G. Change the i_size
field to "unsigned long" so that it actually works.
Thanks to Robert Sciuk for sending me a DVD that
demonstrated ISO9660-formatted media with a file >2G.
I've now fixed this both in libarchive and in the cd9660
filesystem.
Tim Kientzle [Fri, 8 Dec 2006 07:19:51 +0000 (07:19 +0000)]
Support the "-f" option by simply ignoring it.
This allows script compatibility with Linux, whose
"hostname" is the same as BSD "hostname -s".
With this change, "hostname -f" is the same on
both systems.
Hiroki Sato [Fri, 8 Dec 2006 06:34:06 +0000 (06:34 +0000)]
Add a link-local address to the lo0 even when ipv6_enable="NO".
A kernel with INET6 always has ::1 on lo0, so in the case of
ipv6_enable="NO" the lo0 can have ::1 with no link-local address.
This is a violation of the IPv6 specification. As a workaround for
this situation, fe80::1 is added in rc.d/auto_linklocal when lo0 has
no link-local address. This should not be harmful for IPv4-only users.
Tim Kientzle [Fri, 8 Dec 2006 06:13:49 +0000 (06:13 +0000)]
Minor refactoring; move the FreeBSD-specific config info into
config_freebsd.h. archive_platform.h decides which config file
to bring in and uses some of those selectors to define wrapper
macros and other compatibility glue.
Marius Strobl [Fri, 8 Dec 2006 03:18:16 +0000 (03:18 +0000)]
- Revert the parts of the previous revision which reloaded the watchdog
timer in xl_txeof()/xl_txeof_90xB(); xl_poll_locked() unconditionally
invokes xl_txeof()/xl_txeof_90xB(), effectively circumventing that
the watchdog ever fires in the DEVICE_POLLING case as its timer is
constantly reloaded.
- Remove the banal and pedantically outdated comment regarding setting
xl_wdog_timer to 0 in xl_txeof().
Craig Rodrigues [Thu, 7 Dec 2006 03:24:43 +0000 (03:24 +0000)]
Pass a char buffer parameter with name "errmsg" to nmount().
For filesystems which use vfs_mount_error() to log an error, this
char buffer will be populated with a string error message.
If nmount() fails, in addition to printing out strerror(errno),
print out the "errmsg" populated by vfs_mount_error().
Craig Rodrigues [Thu, 7 Dec 2006 02:57:00 +0000 (02:57 +0000)]
Use vfs_mount_error() to log mount errors in a few places with human
readable strings which can be retrieved if an "errmsg" parameter is
passed into nmount().
Sam Leffler [Thu, 7 Dec 2006 00:49:33 +0000 (00:49 +0000)]
Handle a missing NPE firmware file better; if it's missing print a
(somewhat) meaningful message and terminate the build. It'd be
nice to print a proper URL from which to fetch the file but that
seems problematic. Leave a suggested starting point in this file
(TBD: add it to the man page).
Maxim Sobolev [Wed, 6 Dec 2006 18:27:17 +0000 (18:27 +0000)]
Allow machdep.cpu_idle_hlt to be set from the loader. This should allow
to workaround the problem with SMP kernels on Turion64 X2 processors
described in kern/104678 and may be useful in other situations too.
Bruce A. Mah [Wed, 6 Dec 2006 18:04:52 +0000 (18:04 +0000)]
Reorganize the release notes to better support multiple architectures.
Rather than rendering a different version of the release notes for
every architecture, we now produce a single release notes document
that covers all architectures.
This change makes document maintenence easier (because there is no
longer a need to support each architecture specifically in the
src/release/doc/ and www/ build infrastructures). It's also
easier to read because there is now exactly one release notes document,
and readers can see changes that affected various subsets of
architectures.
John Baldwin [Wed, 6 Dec 2006 17:45:35 +0000 (17:45 +0000)]
Ignore any breakpoint instructions (int 3) we encounter in vm86 mode
rather than treating them as a fatal exception and halting. At least one
storage BIOS (some newer mpt(4) parts) have a breakpoint instruction in
their disk read routine.
Julian Elischer [Wed, 6 Dec 2006 06:34:57 +0000 (06:34 +0000)]
Threading cleanup.. part 2 of several.
Make part of John Birrell's KSE patch permanent..
Specifically, remove:
Any reference of the ksegrp structure. This feature was
never fully utilised and made things overly complicated.
All code in the scheduler that tried to make threaded programs
fair to unthreaded programs. Libpthread processes will already
do this to some extent and libthr processes already disable it.
Also:
Since this makes such a big change to the scheduler(s), take the opportunity
to rename some structures and elements that had to be moved anyhow.
This makes the code a lot more readable.
The ULE scheduler compiles again but I have no idea if it works.
The 4bsd scheduler still reqires a little cleaning and some functions that now do
ALMOST nothing will go away, but I thought I'd do that as a separate commit.
Tested by David Xu, and Dan Eischen using libthr and libpthread.
Marius Strobl [Wed, 6 Dec 2006 02:18:41 +0000 (02:18 +0000)]
- Use the xl_stats_update() callout instead of if_slowtimo() for
driving xl_watchdog() in order to avoid races accessing if_timer.
While at it relax the watchdog a bit by reloading it in xl_txeof()/
xl_txeof_90xB() if there are still packets enqueued.
- Use bus_get_dma_tag() so xl(4) works on platforms requiring it.
- Don't bother to set if_mtu to ETHERMTU, ether_ifattach() does that.
Marius Strobl [Wed, 6 Dec 2006 02:07:20 +0000 (02:07 +0000)]
- Use the hme_tick() callout instead of if_slowtimo() for driving
hme_watchdog() in order to avoid races accessing if_timer.
- Use bus_get_dma_tag() so hme(4) works on platforms requiring it.
- Don't bother to set if_mtu to ETHERMTU, ether_ifattach() does that.
Marius Strobl [Wed, 6 Dec 2006 02:04:25 +0000 (02:04 +0000)]
- Use the gem_tick() callout instead of if_slowtimo() for driving
gem_watchdog() in order to avoid races accessing if_timer.
While at it relax the watchdog a bit by reloading it in gem_tint()
if there are still packets enqueued.
- Don't bother to set if_mtu to ETHERMTU, ether_ifattach() does that.
- Fix inconsistencies in prototypes.
Marius Strobl [Wed, 6 Dec 2006 01:56:38 +0000 (01:56 +0000)]
- Use our own callout (the dc_tick() callout uses varying periods
depending on the NIC and isn't used at all with HomePNA links)
instead of if_slowtimo() for driving dc_watchdog() in order to
avoid races accessing if_timer.
- Use bus_get_dma_tag() so dc(4) works on platforms requiring it.
- Don't bother to set if_mtu to ETHERMTU, ether_ifattach() does that.
- Remove an alpha remnant in dc_softc.