mjacob [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 [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.
rmacklem [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().
rmacklem [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.
delphij [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.
jkim [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.
alc [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.)
jkim [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.
jkim [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.
nwhitehorn [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.
nwhitehorn [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.
nwhitehorn [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
glebius [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.
rrs [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.
rrs [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.
bz [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.
syrinx [Wed, 24 Mar 2010 16:07:33 +0000 (16:07 +0000)]
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 [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 [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.
nwhitehorn [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 [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.
jkim [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.
rmacklem [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
jkim [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.
jkim [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 [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 [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.
rpaulo [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.
nwhitehorn [Tue, 23 Mar 2010 03:14:44 +0000 (03:14 +0000)]
Get nexus(4) out of the RTC business. The interface used by nexus(4)
in Open Firmware was Apple-specific, and we have complete coverage of Apple
system controllers, so move RTC responsibilities into the system controller
drivers. This avoids interesting problems from manipulating these devices
through Open Firmware behind the backs of their drivers.
rrs [Tue, 23 Mar 2010 01:36:50 +0000 (01:36 +0000)]
Fixes a bug where SACKs in the face of
mapping_array expansion would break. Basically
once we expanded the array we no longer had both
mapping arrays in sync which the sack processing code depends on.
This would mean we were randomly referring to memory that was probably
not there. This mostly just gave us bad sack results going back to the peer.
If INVARIENTS was on of course we would hit the panic routine in the sack_check
call.
We also add a print routine for the place where one would panic in
invarients so one can see what the main mapping array holds.
nwhitehorn [Tue, 23 Mar 2010 01:09:45 +0000 (01:09 +0000)]
Do not declare the various OFW command buffers static. It does not
appear to be necessary on either sparc64 or powerpc, and is a
concurrency nightmare.
kmacy [Mon, 22 Mar 2010 23:04:12 +0000 (23:04 +0000)]
- boot-time size the ipv4 flowtable and the maximum number of flows
- increase flow cleaning frequency and decrease flow caching time
when near the flow limit
- stop allocating new flows when within 3% of maxflows don't start
allocating again until below 12.5%
edwin [Mon, 22 Mar 2010 21:27:51 +0000 (21:27 +0000)]
MFV of tzdata2010f:
The Australian Antartic Division:
- Macquarie Island will stay on UTC+11 for winter and not switch back from DST.
- Casey station reverted to its normal time of UTC+8 on 5 March 2010.
- Davis station will revert to its normal time of UTC+7 at 10 March 2010
- Mawson station stays on UTC+5.
Syria will start DST on Thursday 1 April 2010 at midnight.
marcel [Mon, 22 Mar 2010 18:24:42 +0000 (18:24 +0000)]
o Remove the pmap argument to pmap_invalidate_all() as it's not used
other than in a potentially dangerous KASSERT.
o Hand-inline pmap_remove_page() as it's only called from 1 place and
the abstraction that pmap_remove_page() provides is not enough to
warrant the obfuscation. Eliminate the dangerous KASSERT in the
process.
o In pmap_remove_pte(), remove the KASSERT for pmap being the current
one as it's not safe in the face of CPU migration.
des [Mon, 22 Mar 2010 11:00:57 +0000 (11:00 +0000)]
Merge upstream r432:
pam_end() already contains a NULL check, and it is not unreasonable to
call it with a NULL pamh in a cleanup / error-handling situation. Remove
OPENPAM_NONNULL, which may cause gcc to optimize away the NULL check.
This fixes a potential NULL pointer dereference in error-handling code
in passwd(1).
marcel [Mon, 22 Mar 2010 04:24:19 +0000 (04:24 +0000)]
Drop the pmap argument to pmap_invalidate_page(). It's not used other
than in a KASSERT. The KASSERT is broken in that it's done outside the
critical section and as such isn't protected against CPU migration.
Improve pmap_invalidate_page() as follows:
o calculate vhpt_ofs inside the critical region for exactly the same
reason.
o calculate the tag outside the FOREACH loop, as it's loop-invariant.
This is more efficient.
o Replace the test and set with an atomic cmpset operation because we
are changing other CPU's VHPT tables and this avoids invalidating
after the entry got modified. Not necessarily a problem, but better
safe than sorry.
marcel [Mon, 22 Mar 2010 04:01:45 +0000 (04:01 +0000)]
With preemption, the high FP registers may get enabled by cpu_switch()
before we grab the mutex. Don't assert that they must be disabled at
that point. We pretty much bypass all logic in that case anyway and
leave immediately, so there's no harm.
marcel [Mon, 22 Mar 2010 03:55:18 +0000 (03:55 +0000)]
Fix interrupt handling by extending the critical region so that
preemption doesn't happen until after all pending interrupt have
been services.
While here again, simplify the EOI handling by doing it after we
call the XIV-specific handlers, rather than in each of them. The
original thought was that we may want to do an EOI first and the
actual IPI handling next, but that's mostly a micro-optimization.
marcel [Mon, 22 Mar 2010 03:06:11 +0000 (03:06 +0000)]
Disable interrupts when calling into SAL for PCI configuration
cycles. This serves 2 purposes:
1. It prevents preemption and CPU migration while running SAL code.
2. It reduces the chance of stack overflows: we're supposed to enter
SAL with at least 16KB of either memory- or register stack space,
which we can't do without switching to a different stack.