Xin LI [Sun, 14 Nov 2010 05:05:41 +0000 (05:05 +0000)]
Workaround build for PAE case for now - revert the PHYS
case to previous panic behavior.
I have a real fix that changes the sg dma tag allocation
to be limited to the under 4GB address space but would
prefer to have review before committing.
Marius Strobl [Sat, 13 Nov 2010 22:40:37 +0000 (22:40 +0000)]
When setting a media with no sub-type specified also reset the type
specific options along with the global ones so these options don't
stick when f.e. switching to IFM_AUTO.
Warner Losh [Sat, 13 Nov 2010 22:34:12 +0000 (22:34 +0000)]
Remove the 'machine mips' from DEFAULTS. Put the proper 'machine mips
mipsel' or 'machine mips mipseb' into the config file (with a few 64's
tossed in for good measure). This will let us build the proper
kernels with different worlds as part of make universe.
Marius Strobl [Sat, 13 Nov 2010 21:03:19 +0000 (21:03 +0000)]
When printing media with more than one media option set aggregate these
in a comma delimited list instead of repeating "mediaopt" for each one.
This matches how the options of the active media are printed with
print_media_word() and brings us in line what NetBSD does.
Warner Losh [Sat, 13 Nov 2010 20:30:24 +0000 (20:30 +0000)]
Default to little endian output when building for little endian. This
got lost as a result of a mismerge a few months back and I didn't
notice until I collapsed tbemd into -head.
1) We need to allow the USB callback to free the USB transfer itself.
2) The USB transfer buffer should only be automatically freed when
freeing the USB transfer.
Michael Tuexen [Sat, 13 Nov 2010 17:52:04 +0000 (17:52 +0000)]
Add for existing protocol entries the missing SCTP port allocations
and add protocol entries for protocols which have SCTP port allocations.
These entries are according to
http://www.iana.org/assignments/port-numbers
as of today. Also add SCTP port allocation entires for the
echo, daytime, and chargen service.
Discussed with rwatson@
In printfile(), exit the process instead of only printing the warning.
This fixes verbose mode when either -i specified non-existent kldfile
id, or the file was unloaded between two kldnext(2) calls.
While there, fix printfile() definition to be style(9)-compliant.
Bernhard Schmidt [Sat, 13 Nov 2010 14:59:54 +0000 (14:59 +0000)]
Some device drivers calculate various timing related things based on
the currently selected rate. The calculations of course need a valid
rate. To make that possible before any call to node_rate() is done,
initialize ni_txrate on none_node_init() calls.
Ulrich Spörlein [Sat, 13 Nov 2010 10:54:10 +0000 (10:54 +0000)]
Fix bug in jn(3) and jnf(3) that led to -inf results
Explanation by Steve:
jn[f](n,x) for certain ranges of x uses downward recursion to compute
the value of the function. The recursion sequence that is generated is
proportional to the actual desired value, so a normalization step is
taken. This normalization is j0[f](x) divided by the zeroth sequence
member. As Bruce notes, near the zeros of j0[f](x) the computed value
can have giga-ULP inaccuracy. I found for the 1st zero of j0f(x) only
the leading decimal digit is correct. The solution to the issue is
fairly straight forward. The zeros of j0(x) and j1(x) never coincide,
so as j0(x) approaches a zero, the normalization constant switches to
j1[f](x) divided by the 2nd sequence member. The expectation is that
j1[f](x) is a more accurately computed value.
PR: bin/144306
Submitted by: Steven G. Kargl <kargl@troutmask.apl.washington.edu>
Reviewed by: bde
MFC after: 7 days
Jaakko Heinonen [Sat, 13 Nov 2010 09:28:49 +0000 (09:28 +0000)]
Set FD_CLOEXEC for the output file only when the file has been specified
with the -o option. Setting the flag for stderr (the default) could
cause the traced process to redirect stderr to a random file.
PR: bin/152151
Submitted by: ashish
MFC after: 5 days
Xin LI [Sat, 13 Nov 2010 08:58:36 +0000 (08:58 +0000)]
Update to vendor release 1.20.00.19.
Bug fixes:
* Fixed "inquiry data fails comparion at DV1 step"
* Fixed bad range input in bus_alloc_resource for ADAPTER_TYPE_B
* Fixed arcmsr driver prevent arcsas support for Areca SAS HBA ARC13x0
Many thanks to Areca for continuing to support FreeBSD.
This commit is intended for MFC before 8.2-RELEASE.
Submitted by: Ching-Lung Huang <ching2048 areca com tw>
Adrian Chadd [Sat, 13 Nov 2010 03:11:27 +0000 (03:11 +0000)]
Break out the rules which generate crunchgen'ed binaries into a separate
.mk file so they can be reused.
Introduce a new option, CRUNCH_BUILDTOOLS, which lists the binaries that
require tools built in the local architecture. sh and csh both require this.
It was previously hardcoded in rescue/rescue/Makefile .
Introduce a new option, CRUNCH_SHLIBS, which lists the shared libraries
to link against. These override the static libraries listed in CRUNCH_LIBS.
Some build environments may wish to use a handful of shared libraries
(eg libc.so) so other small, dynamic binaries can be run in the environment.
Remove the now-shared code from rescue/rescue/Makefile and introduce the
CRUNCH_BUILDTOOLS option for the above shells.
Brooks Davis [Sat, 13 Nov 2010 00:40:43 +0000 (00:40 +0000)]
Add an (off by default) check for negative permissions (where the
group on a object has less permissions that everyone). These
permissions will not work reliably over NFS if you have more than
14 supplemental groups and are usually not what you mean.
Dimitry Andric [Fri, 12 Nov 2010 22:59:50 +0000 (22:59 +0000)]
Similar to r212647, remove the workaround in sys/net/vnet.h for an ld
bug (incorrect placement of __start_SECNAME in some cases) that was
fixed in r210245.
There is already an UPDATING entry about needing a recent ld.
Add a queue to hold packets while we await an ARP reply.
When a fast machine first brings up some non TCP networking program
it is quite possible that we will drop packets due to the fact that
only one packet can be held per ARP entry. This leads to packets
being missed when a program starts or restarts if the ARP data is
not currently in the ARP cache.
This code adds a new sysctl, net.link.ether.inet.maxhold, which defines
a system wide maximum number of packets to be held in each ARP entry.
Up to maxhold packets are queued until an ARP reply is received or
the ARP times out. The default setting is the old value of 1
which has been part of the BSD networking code since time
immemorial.
Expose the time we hold an incomplete ARP entry by adding
the sysctl net.link.ether.inet.wait, which defaults to 20
seconds, the value used when the new ARP code was added..
Jung-uk Kim [Fri, 12 Nov 2010 21:11:49 +0000 (21:11 +0000)]
Warn users that acpi.ko is deprecated and exit immediately unless the user
set FORCE_BUILD. This is to avoid foot-shooting while making MFC to stable
branches easier.
Jung-uk Kim [Fri, 12 Nov 2010 20:55:14 +0000 (20:55 +0000)]
MFamd64: (based on) r209957
Move logic of building ACPI headers for acpi_wakeup.c into better places,
remove intermediate makefile and shell script, and reduce diff between i386
and amd64.
Nathan Whitehorn [Fri, 12 Nov 2010 20:26:34 +0000 (20:26 +0000)]
Partially revert r215182. There appears to be a silicon bug on the 970
that causes AP bringup to fail if some of the Cell HID-register code
is anywhere in the instruction stream. Pending a better solution, cache
performance on SMP Cell systems running without a hypervisor will be
suboptimal.
Maksim Yevmenkin [Fri, 12 Nov 2010 19:43:12 +0000 (19:43 +0000)]
Add firmware downloader for Atheros AR3011 based USB Bluetooth devices.
Hardware donated by: Rusty Nejdl rnejdl at ringofsaturn dot com
Tested by: Rusty Nejdl rnejdl at ringofsaturn dot com
Tested by: Andrzej Tobola ato at iem dot pw dot edu dot pl
MFC after: 3 weeks
Jung-uk Kim [Fri, 12 Nov 2010 17:10:12 +0000 (17:10 +0000)]
Create C1 state when _CST is valid but _CST does not have one. Some BIOSes
do not report C1 state in _CST object, probably because it is a mandatory
state with or without existence of the optional _CST.
Ed Schouten [Fri, 12 Nov 2010 15:52:27 +0000 (15:52 +0000)]
Revert to libgcc for sparc64.
I've had a report of a sparc64 system where cc1 generates illegal
instructions. We still have to diagnose this properly, but instead of
hosing all sparc64 boxes out there, fall back to libgcc to prevent more
damage.
Jilles Tjoelker [Fri, 12 Nov 2010 14:40:20 +0000 (14:40 +0000)]
sh(1): Modernize the introduction a bit.
In particular, remove the text about ksh-like features, which are usually
taken for granted nowadays. The original Bourne shell is fading away and for
most users our /bin/sh is one of the most minimalistic they know.
Luigi Rizzo [Fri, 12 Nov 2010 13:05:17 +0000 (13:05 +0000)]
The first customer of the SO_USER_COOKIE option:
the "sockarg" ipfw option matches packets associated to
a local socket and with a non-zero so_user_cookie value.
The value is made available as tablearg, so it can be used
as a skipto target or pipe number in ipfw/dummynet rules.
Luigi Rizzo [Fri, 12 Nov 2010 13:02:26 +0000 (13:02 +0000)]
This commit implements the SO_USER_COOKIE socket option, which lets
you tag a socket with an uint32_t value. The cookie can then be
used by the kernel for various purposes, e.g. setting the skipto
rule or pipe number in ipfw (this is the reason SO_USER_COOKIE has
been implemented; however there is nothing ipfw-specific in its
implementation).
The ipfw-related code that uses the optopn will be committed separately.
This change adds a field to 'struct socket', but the struct is not
part of any driver or userland-visible ABI so the change should be
harmless.
See the discussion at
http://lists.freebsd.org/pipermail/freebsd-ipfw/2009-October/004001.html
Idea and code from Paul Joe, small modifications and manpage
changes by myself.
Sergey Kandaurov [Fri, 12 Nov 2010 12:07:36 +0000 (12:07 +0000)]
Stop documenting vgonel() after its converting to the static function:
svn r147332 (by jeff): "Don't make vgonel() globally visible".
While here, specify the vnode locking scheme for vgone().
Discussed on: freebsd-hackers@
Approved by: kib (mentor)
MFC after: 10 days
Lawrence Stewart [Fri, 12 Nov 2010 06:41:55 +0000 (06:41 +0000)]
This commit marks the first formal contribution of the "Five New TCP Congestion
Control Algorithms for FreeBSD" FreeBSD Foundation funded project. More details
about the project are available at: http://caia.swin.edu.au/freebsd/5cc/
- Add a KPI and supporting infrastructure to allow modular congestion control
algorithms to be used in the net stack. Algorithms can maintain per-connection
state if required, and connections maintain their own algorithm pointer, which
allows different connections to concurrently use different algorithms. The
TCP_CONGESTION socket option can be used with getsockopt()/setsockopt() to
programmatically query or change the congestion control algorithm respectively
from within an application at runtime.
- Integrate the framework with the TCP stack in as least intrusive a manner as
possible. Care was also taken to develop the framework in a way that should
allow integration with other congestion aware transport protocols (e.g. SCTP)
in the future. The hope is that we will one day be able to share a single set
of congestion control algorithm modules between all congestion aware transport
protocols.
- Introduce a new congestion recovery (TF_CONGRECOVERY) state into the TCP stack
and use it to decouple the meaning of recovery from a congestion event and
recovery from packet loss (TF_FASTRECOVERY) a la RFC2581. ECN and delay based
congestion control protocols don't generally need to recover from packet loss
and need a different way to note a congestion recovery episode within the
stack.
- Remove the net.inet.tcp.newreno sysctl, which simplifies some portions of code
and ensures the stack always uses the appropriate mechanisms for recovering
from packet loss during a congestion recovery episode.
- Extract the NewReno congestion control algorithm from the TCP stack and
massage it into module form. NewReno is always built into the kernel and will
remain the default algorithm for the forseeable future. Implementations of
additional different algorithms will become available in the near future.
- Bump __FreeBSD_version to 900025 and note in UPDATING that rebuilding code
that relies on the size of "struct tcpcb" is required.
Many thanks go to the Cisco University Research Program Fund at Community
Foundation Silicon Valley and the FreeBSD Foundation. Their support of our work
at the Centre for Advanced Internet Architectures, Swinburne University of
Technology is greatly appreciated.
In collaboration with: David Hayes <dahayes at swin edu au> and
Grenville Armitage <garmitage at swin edu au>
Sponsored by: Cisco URP, FreeBSD Foundation
Reviewed by: rpaulo
Tested by: David Hayes (and many others over the years)
MFC after: 3 months
Nathan Whitehorn [Fri, 12 Nov 2010 05:12:38 +0000 (05:12 +0000)]
Remove use of a separate ofw_pmap on 32-bit CPUs. Many Open Firmware
mappings need to end up in the kernel anyway since the kernel begins
executing in OF context. Separating them adds needless complexity,
especially since the powerpc64 and mmu_oea64 code gave up on it a long
time ago.
As a side effect, the PPC ofw_machdep code is no longer AIM-specific,
so move it to powerpc/ofw.
Nathan Whitehorn [Fri, 12 Nov 2010 04:18:19 +0000 (04:18 +0000)]
Add some platform KOBJ extensions and continue integrating PowerPC
hypervisor infrastructure support:
- Fix coexistence of multiple platform modules in the same kernel
- Allow platform modules to provide an SMP topology
- PowerPC hypervisors limit the amount of memory accessible in real mode.
Allow the platform modules to specify the maximum real-mode address,
and modify the bits of the kernel that need to allocate
real-mode-accessible buffers to respect this limits.
Nathan Whitehorn [Fri, 12 Nov 2010 04:13:48 +0000 (04:13 +0000)]
Fix an error in r215067. An existing /chosen/mmu but missing translations
property just means we shouldn't add any translations, not that we should
panic.
Nathan Whitehorn [Fri, 12 Nov 2010 03:43:22 +0000 (03:43 +0000)]
Centralize CPU idle routines into powerpc/cpu.c and use the same
cpu_idle_hook mechanism that x86 uses for overriding the idle routine.
This is required for supporting ilding the CPU under PowerPC hypervisors.
Lawrence Stewart [Fri, 12 Nov 2010 00:44:18 +0000 (00:44 +0000)]
Standardise all Swinburne related copyright/licence statements throughout the
tree in preparation for another large code import. Swinburne University is the
legal entity that owns copyright and the 2-clause BSD licence is acceptable.
Dimitry Andric [Thu, 11 Nov 2010 22:35:42 +0000 (22:35 +0000)]
Make sure to specify the alignment of minbrk and curbrk. They were correctly
aligned by accident with earlier binutils, but no longer are, causing link
failures.
Dimitry Andric [Thu, 11 Nov 2010 21:36:52 +0000 (21:36 +0000)]
Remove some unneeded spaces from the __sym_compat() macro, since newer
versions of gas are more fussy about spaces surrounding '@' signs in
versioned symbol names.
Andrew Thompson [Thu, 11 Nov 2010 20:18:33 +0000 (20:18 +0000)]
Add a GPIO driver for the Gateworks Cambria platform.
The external gpio pins are connected to a PLD on the i2c bus, unfortunatley
this device does not conform by failing to send an ack after each byte written.
The iicbb driver will abort the transfer when the address is not ack'd and it
would introduce a lot of churn to be able to pass a flag down to
iicbb_start/iicbb_write. Instead we do bad things by grabbing the iicbus but
then doing our own bit banging.
Jung-uk Kim [Thu, 11 Nov 2010 19:20:33 +0000 (19:20 +0000)]
Add compat shim for apm(4) to translate APM BIOS function numbers from i386
to PC98-specific ones. Any binaries using apm ioctl(4) commands but built
for i386 should also work on PC98 now.
Dimitry Andric [Thu, 11 Nov 2010 19:18:52 +0000 (19:18 +0000)]
Use the same treatment as in linker_set.h for the __start and __stop
symbols of the set_vnet and set_pcpu sections, so those symbols will
always be emitted in kernel modules, if they use vnet.h or pcpu.h.
Also, for pcpu.h, make the __(start|stop)_set_pcpu declarations, and
associated macros invisible to userland, to prevent it picking up these
symbols.
Dimitry Andric [Thu, 11 Nov 2010 19:17:59 +0000 (19:17 +0000)]
Revert r103230, which depended on ld preserving the __start_xxx and
__stop_xxx symbols for custom sections, even when these were not
referenced (at link time). This behaviour was changed again in binutils
commit 0b8ed435c3fe8bd09a08c23920e65bfb03251221.
This time, put the __GLOBL macro definition in cdefs.h, so it can be
reused in a few other places where it will be needed.
Andriy Gapon [Thu, 11 Nov 2010 18:35:28 +0000 (18:35 +0000)]
amd64: introduce minidump version 2
After KVA space was increased to 512GB on amd64 it became impractical
to use PTEs as entries in the minidump map of dumped pages, because size
of that map alone would already be 1GB.
Instead, we now use PDEs as page map entries and employ two stage lookup
in libkvm: virtual address -> PDE -> PTE -> physical address. PTEs are
now dumped as regular pages. Fixed page map size now is 2MB.
libkvm keeps support for accessing amd64 minidumps of version 1.
Support for 1GB pages is added.
Many thanks to Alan Cox for his guidance, numerous reviews, suggestions,
enhancments and corrections.
Pyun YongHyeon [Thu, 11 Nov 2010 18:08:50 +0000 (18:08 +0000)]
Add basic WOL support for MCP ethernet controllers. It seems the
controller does not perform automatic switching from 1000Mbps link
to 10/100Mbps link when WOL is activated. Implement establishing
10/100Mps link with auto-negotiation in driver. Link status change
handler was modified to remove taskqueue based approach since driver
now needs synchronous handling for link establishment.
Ed Schouten [Thu, 11 Nov 2010 15:48:27 +0000 (15:48 +0000)]
Replace libgcc.a by libcompiler_rt.a.
libcompiler_rt.a is a BSD licensed C language runtime, which implements
many routines which are linked into binaries on architectures where
certain functionality is missing (e.g. 64 bits mul/div on i386).
Unfortunately, libcompiler_rt cannot replace libgcc entirely. Certain
features, such as an unwinder for exception handling, are missing.
That's why only libgcc.a is replaced for now, because this one does seem
to be complete.
Tested by: rene (amd64), nwhitehorn (powerpc), droso (i386 exprun)
and many others. Thanks!
Obtained from: user/ed/compiler-rt