Nathan Whitehorn [Sun, 28 Mar 2010 17:17:32 +0000 (17:17 +0000)]
Set hw.ofwfb.relax_mmap=1 by default. While these checks may be a good
idea in principle, X does not work without them on basically any hardware,
and this is probably the most frequent problem people run into on PowerPC.
Ed Schouten [Sun, 28 Mar 2010 13:13:22 +0000 (13:13 +0000)]
Rename st_*timespec fields to st_*tim for POSIX 2008 compliance.
A nice thing about POSIX 2008 is that it finally standardizes a way to
obtain file access/modification/change times in sub-second precision,
namely using struct timespec, which we already have for a very long
time. Unfortunately POSIX uses different names.
This commit adds compatibility macros, so existing code should still
build properly. Also change all source code in the kernel to work
without any of the compatibility macros. This makes it all a less
ambiguous.
I am also renaming st_birthtime to st_birthtim, even though it was a
local extension anyway. It seems Cygwin also has a st_birthtim.
Bjoern A. Zeeb [Sun, 28 Mar 2010 06:51:50 +0000 (06:51 +0000)]
When tearing down IPsec as part of a (virtual) network stack,
do not try to free the same list twice but free both the
acquiring list and the security policy acquiring list.
Antoine Brodin [Sat, 27 Mar 2010 13:43:18 +0000 (13:43 +0000)]
(S)LIST_HEAD_INITIALIZER takes a (S)LIST_HEAD as an argument.
Fix some wrong usages.
Note: this does not affect generated binaries as this argument is not used.
Kai Wang [Sat, 27 Mar 2010 08:00:16 +0000 (08:00 +0000)]
Merge improvements from kernel HID parser to the userland usbhid(3)
parser. This merge does not change any API and should not break any
native or thirdparty applications.
Changes include:
* Merge multiple report ID support and other improvements from kernel
HID parser.
* Ignore rid argument in hid_start_parser, parse all the report items since
we now support multiple report ID.
* Skip report ID byte in hid_get_data() and set report ID byte in
hid_set_data(), if report ID is non-zero.
* Reimplement hid_get_report_id: instead get report id from uhid device
(which is always 0), try parsing the report descriptor and return the
first report ID encountered.
Marcel Moolenaar [Sat, 27 Mar 2010 06:53:11 +0000 (06:53 +0000)]
Bring up-to-date:
o Switch to ITANIUM2 has the cpu. This has absolutely no effect
on the code, but makes for a better example.
o Drop COMPAT_FREEBSD6. We're tier 2, so you're supposed to run
8-stable or newer.
o Add PREEMPTION. It works now.
o Remove HWPMC_HOOKS. We don't have support for hwpmc yet.
o Add a bunch of new devices: atapist, hptiop, amr, ips, twa, igb,
ixgbe, ae, age, alc, ale, bce, bfe, et, jme, msk, nge, sk, ste,
stge, tx, vge, axe, rue, udav, fwip, and all USB serial.
o Remove "legacy" devices: le, vx, dc, pcn, rl, sis.
Make sure to the module list is a superset of what goes into GENERIC.
Marcel Moolenaar [Sat, 27 Mar 2010 05:40:50 +0000 (05:40 +0000)]
Implement interrupt to CPU binding. Assign interrupts to CPUs in a
round-robin fashion, starting with the highest priority interrupt
on the highest-numbered CPU and cycling downwards.
Marcel Moolenaar [Sat, 27 Mar 2010 03:15:34 +0000 (03:15 +0000)]
Remove nx_pcibus from the nexus resource. Nexus is not involved
with PCI busses. Remove nexus_read_ivar() and nexus_write_ivar()
to give default behaviour. Remove <machine/nexusvar.h> as well,
because there's nothing in it that's being used.
Jack F Vogel [Sat, 27 Mar 2010 00:21:40 +0000 (00:21 +0000)]
Update the driver to Intel version 2.1.6
- add some new hardware support for 82599
- Big change to interrupt architecture, it now
uses a queue which contains an RX/TX pair as
the recipient of the interrupt. This will reduce
overall system interrupts/msix usage.
- Improved RX mbuf handling: the old get_buf routine
is no longer synchronized with rxeof, this allows
the elimination of packet discards due to mbuf
allocation failure.
- Much simplified and improved AIM code, it now
happens in the queue interrupt context and takes
into account both the traffic on the RX AND TX
side.
- variety of small tweaks, like ring size, that have
been seen as performance improvements.
- Thanks to those that provided feedback or suggested
changes, I hope I've caught all of them.
Marcel Moolenaar [Fri, 26 Mar 2010 21:22:02 +0000 (21:22 +0000)]
Rename disable_intr() to ia64_disable_intr() and rename enable_intr()
to ia64_enable_intr(). This reduces confusion with intr_disable() and
intr_restore().
Have configure_final() call ia64_finalize_intr() instead of enable_intr()
in preparation of adding support for binding interrupts to all CPUs.
Matt Jacob [Fri, 26 Mar 2010 15:13:31 +0000 (15:13 +0000)]
Clean up some printing stuff so that we can have a bit finer control
on debug output. Add a new platform function requirement to allow
for printing based upon the ITL nexus instead of the isp unit plus
channel, target and lun. This allows some printouts and error messages
from the core code to appear in the same format as the platform's
subsystem (in FreeBSD's case, CAM path).
Marcel Moolenaar [Fri, 26 Mar 2010 02:29:15 +0000 (02:29 +0000)]
Only use the interval timer for clock interrupts on the BSP and
have the BSP use IPIs to trigger clock interrupts on the APs.
This allows us to run on hardware configurations for which the
ITC has non-uniform frequencies across CPUs.
While here, change the clock XIV to type IPI so as to protect
the interrupt delivery against CPU re-balancing once that's
implemented.
Rick Macklem [Fri, 26 Mar 2010 01:35:19 +0000 (01:35 +0000)]
Patch the experimental NFS server in a manner analagous to r205661
for the regular NFS server, to ensure that ESTALE is
returned to the client for all errors returned by VFS_FHTOVP().
Rick Macklem [Fri, 26 Mar 2010 01:19:29 +0000 (01:19 +0000)]
Patch the regular NFS server so that it returns ESTALE to the client
for all errors returned by VFS_FHTOVP(). This is required to ensure
that EIO doesn't get returned to the client when ZFS is used as the
server file system.
Xin LI [Thu, 25 Mar 2010 20:02:54 +0000 (20:02 +0000)]
The rmt client in GNU cpio could have a heap overflow when a malicious
remote tape service returns deliberately crafted packets containing
more data than requested.
Fix this by checking the returned amount of data and bail out when it
is more than what we requested.
Jung-uk Kim [Thu, 25 Mar 2010 17:51:05 +0000 (17:51 +0000)]
Do not penalize correct or correctable VESA mode tables by calling another
VBE function. Most problems should be corrected by the mode table sanity
check and we only need the paranoid in extremely rare cases.
Alan Cox [Thu, 25 Mar 2010 17:24:03 +0000 (17:24 +0000)]
A ptrace(2) by one processor may trigger a promotion in the address space
of another process. Modify pmap_promote_pde() to handle this. (This is
not a problem on amd64 due to implementation differences.)
Jung-uk Kim [Thu, 25 Mar 2010 17:14:47 +0000 (17:14 +0000)]
Revert accidentally committed initial real mode %sp change of r205347.
Note I am keeping %ds change because X.org int10 handler does it and
it seems reasonable.
Jung-uk Kim [Thu, 25 Mar 2010 15:56:04 +0000 (15:56 +0000)]
Fix stupid typos. Some VESA BIOSes directly call BIOS interrupt handlers
within the VBE interrupt handler. Unfortunately it was causing real mode
page faults because we were fetching instructions from bogus addresses.
Pass me the pointyhat, please.
Nathan Whitehorn [Thu, 25 Mar 2010 14:31:26 +0000 (14:31 +0000)]
Add the ELF relocation base to struct image_params. This will be
required to correctly relocate the executable entry point's function
descriptor on powerpc64.
Nathan Whitehorn [Thu, 25 Mar 2010 14:24:00 +0000 (14:24 +0000)]
Change the arguments of exec_setregs() so that it receives a pointer
to the image_params struct instead of several members of that struct
individually. This makes it easier to expand its arguments in the future
without touching all platforms.
Nathan Whitehorn [Thu, 25 Mar 2010 14:21:22 +0000 (14:21 +0000)]
Change the way text_addr and data_addr are computed to use the
executable status of segments instead of detecting the main text segment
by which segment contains the program entry point. This affects
obreak() and is required for correct operation of that function
on 64-bit PowerPC systems. The previous behavior was apparently
required only for the Alpha, which is no longer supported.
Reviewed by: jhb
Tested on: amd64, sparc64, powerpc
Gleb Smirnoff [Thu, 25 Mar 2010 10:13:21 +0000 (10:13 +0000)]
Remove disabled code. In 99% cases exports are send to ng_ksocket(4), which
already forces queued mode, so what was suggested in disabled code is already
done.
Randall Stewart [Wed, 24 Mar 2010 20:02:40 +0000 (20:02 +0000)]
Adds the option of keeping per-cpu statistics in SCTP. This
may be useful since it gets rid of atomics but I want it to
remain an option until I can do further testing on if it really
speeds things up.
Randall Stewart [Wed, 24 Mar 2010 19:45:36 +0000 (19:45 +0000)]
Fix for NR-Sack code. The code was NOT working properly when
enabled. Basically most of the operations were incorrect causing
bad sacks when you enabled nr-sack. The fixes range across
4 files and unifiy most of the processing so that we only test
nr_sack flags to decide which type of sack to generate.
Optimization left for this is to combine the sack generation
code and make it capable of generating either sack thus shrinking
out a routine.
Bjoern A. Zeeb [Wed, 24 Mar 2010 19:21:26 +0000 (19:21 +0000)]
Print the pointer to the lock with the panic message. The previous
panic: rw lock not unlocked
was not really helpful for debugging. Now one can at least call
show lock <ptr>
form ddb to learn more about the lock.
Now actually implement reading/refreshing/returning data from the pfTablesAddrTable
and modify the BEGEMOT-PF-MIB to add support for IPV6 address' statistics in the PF
tables via pfTablesAddrNetType and pfTablesAddrNet. While here, upgrade the
pf_tree.def file to the new format that includes enumerated values. Also make sure
to return SNMP_ERR_NOSUCHNAME for ALTQ objects, if ALTQ is disabled, so that the agent
will know to skip the pfAltq subtree when servicing GETNEXT requests from SNMP clients
(otherwise snmpwalk on begemotPf would stop at the pfAltq subtree with bsnmpd returning
SNMP_ERR_GENERR).
Luigi Rizzo [Wed, 24 Mar 2010 15:16:59 +0000 (15:16 +0000)]
Honor ip.fw.one_pass when a packet comes out of a pipe without being delayed.
I forgot to handle this case when i did the mtag cleanup three months ago.
Neel Natu [Wed, 24 Mar 2010 04:52:15 +0000 (04:52 +0000)]
Fix periodic "t_delta 16.01359db7eb5eb3c0 too long" messages on the console by
accounting for the "lost time" between when the timer interrupt fired
and when clock_intr() actually started executing.
Nathan Whitehorn [Wed, 24 Mar 2010 03:13:24 +0000 (03:13 +0000)]
The nargvstr and nenvstr properties of arginfo are ints, not longs,
so should be copied to userspace with suword32() instead of suword().
This alleviates problems on 64-bit big-endian architectures, and is a
no-op on all 32-bit architectures.
Marcel Moolenaar [Tue, 23 Mar 2010 23:46:28 +0000 (23:46 +0000)]
Fix an off-by-one bug for the number of slots on a PCI/PCI-X bus.
We failed to setup PCI devices on slot 31 and that's where the
SATA controller is for the P2020 eval board.
Jung-uk Kim [Tue, 23 Mar 2010 23:10:17 +0000 (23:10 +0000)]
Be extremely careful when we determine bytes per scan line information.
First, we compare mode table data against minimum value. If the mode table
does not make sense, we set the minimum in the mode info. When we actually
set the mode, we try VESA BIOS function and compare it against the previous
value. If it makes more sense, update the information.
Rick Macklem [Tue, 23 Mar 2010 23:03:30 +0000 (23:03 +0000)]
When the regular NFS server replied to a UDP client out of the replay
cache, it did not free the request argument mbuf list, resulting in a leak.
This patch fixes that leak.
Tested by: danny AT cs.huji.ac.il
PR: kern/144330
Submitted by: to.my.trociny AT gmail.com (earlier version)
Reviewed by: dfr
MFC after: 2 weeks
Jung-uk Kim [Tue, 23 Mar 2010 22:50:22 +0000 (22:50 +0000)]
Fall back to VGA palette functions if VESA function failed and DAC is still
in 6-bit mode. Although we have to check non-VGA compatibility bit here,
it seems there are too many broken VESA BIOSes out to rely on it.
Jung-uk Kim [Tue, 23 Mar 2010 22:35:52 +0000 (22:35 +0000)]
Map entire video memory again. This is a partial backout of r203535.
Although we do not use them all directly, it seems VGA render may access
unmapped memory region and cause kernel panic.
Marcel Moolenaar [Tue, 23 Mar 2010 20:12:53 +0000 (20:12 +0000)]
Add definitions for a 4th PCI host controller. No Freescale processor
has all 4 implemented, but across the processors we now support all the
combinations. For example, the MPC8533 doesn't have a PCI controller
at 0xA0000, but does at 0xB0000.
Marcel Moolenaar [Tue, 23 Mar 2010 19:30:56 +0000 (19:30 +0000)]
Enable power management for E500 cores. Use "doze" for now to make
sure the caches remain coherent. For single-core configurations and
with busdma changes we could eventually switch to "nap" and force
a D-cache invalidation as part of the DMA completion. To this end,
clear PSL_WE until after we handled the decrementer or external
interrupt as it tells us whether we just woke up or not.
Rui Paulo [Tue, 23 Mar 2010 14:31:31 +0000 (14:31 +0000)]
When receiving a management frame, pass the mbuf to bpf before calling
iv_recv_mgmt(). iv_recv_mgmt() will generate management frame responses
and pass them to bpf before the management frame that triggered the
response.
PR: 144323
Submitted by: Alexander Egorenkov <egorenar at gmail.com>
MFC after: 2 weeks
Sponsored by: iXsystems, inc.