Mike Silbersack [Mon, 11 Aug 2003 05:51:51 +0000 (05:51 +0000)]
More pipe changes:
From alc:
Move pageable pipe memory to a seperate kernel submap to avoid awkward
vm map interlocking issues. (Bad explanation provided by me.)
From me:
Rework pipespace accounting code to handle this new layout, and adjust
our default values to account for the fact that we now have a solid
limit on allocations.
Also, remove the "maxpipes" limit, as it no longer has a purpose.
(The limit on kva usage solves the problem of having two many pipes.)
Alan Cox [Mon, 11 Aug 2003 00:17:44 +0000 (00:17 +0000)]
Use vm_page_hold() instead of vm_page_wire(). Otherwise, a multithreaded
application could cause a wired page to be freed. In general,
vm_page_hold() should be preferred for ephemeral kernel mappings of pages
borrowed from a user-level address space. (vm_page_wire() should really be
reserved for indefinite duration pinning by the "owner" of the page.)
Jacques Vidrine [Sun, 10 Aug 2003 23:05:37 +0000 (23:05 +0000)]
panic() if we try to handle an out-of-range signal number in
psignal()/tdsignal(). The test was historically in psignal(). It was
changed into a KASSERT, and then later moved to tdsignal() when the
latter was introduced.
David Xu [Sun, 10 Aug 2003 22:20:41 +0000 (22:20 +0000)]
If thread mode is not activated yet, just call __sys_fork() directly,
otherwise masks all signals until fork() returns, in child process,
we reset library state before restoring signal masks until we reach
a safe to point.
Martin Blapp [Sun, 10 Aug 2003 22:01:37 +0000 (22:01 +0000)]
Change name of state_link() to state_polling() to make it
more clear what it does.
Trim interface_active() to just do what it should do. Check
if we got link or not and if the NIC supports it. No special
treatment for mediachecks here anymore.
Simplify the code a lot, and remove doublicated parts.
Alan Cox [Sun, 10 Aug 2003 21:53:55 +0000 (21:53 +0000)]
Rename pmap_changebit() to pmap_clear_ptes() and remove the last
parameter. The new name better reflects what the function does and
how it is used. The last parameter was always FALSE.
Note: In theory, gcc would perform constant propagation and dead code
elimination to achieve the same effect as removing the last parameter,
which is always FALSE. In practice, recent versions do not. So, there
is little point in letting unused code pessimize execution.
Bill Paul [Sun, 10 Aug 2003 18:04:35 +0000 (18:04 +0000)]
The BCM5704 ASIC has a smaller mbuf space than the 5700/1/2/3. Failure
to configure this correctly yields many watchdog timeouts even on lightly
loaded machines. This is a common complaint from users with Dell 1750
servers with built-in dual 5704 NICs.
Marcel Moolenaar [Sun, 10 Aug 2003 08:04:21 +0000 (08:04 +0000)]
Now that we can ignore up to 8KB of dirty registers, remove the RSE
magic from exec_setregs(). In set_mcontext() we now also don't have
to worry that we entered the kernel with more that 512 bytes of
dirty registers on the kernel stack. Note that we cannot make any
assumptions anymore WRT to NaT collection points in exec_setregs(),
so we have to deal with them now.
Bill Paul [Sun, 10 Aug 2003 02:41:18 +0000 (02:41 +0000)]
Grrr. There is a gratuitous difference in the RX descriptor status
word between the 8139C+ and the 8169. The 8139C+ has a 'frame alignment
error bit' (bit 27) but the 8169 does not. Rather than simply mark this
bit as reserved, RealTek removed it completely and shifted the remaining
status bits one space to the left. This was causing rl_rxeofcplus()
to misparse the error and checksum bits.
To workaround this, rl_rxeofcplus() now shifts the rxstat word one
bit to the right before testing any of the status bits (but after
the frame length has been extracted).
Warner Losh [Sun, 10 Aug 2003 02:40:49 +0000 (02:40 +0000)]
Some bridges, like o2 micro and maybe ricoh, have some issues between
the time the card is inserted and the time that the card is
configured. This can lead to interrupt storms. The O2Micro suggested
workaround is to route the card function interrupt to IRQ1. It
appears from my testing that this is an acceptable workaround for most
chipsets (there's still some issue with the ricoh chipset).
Also, only look at the NOT_A_CARD bit when the bridge tells us there's
a card present. At least one test caused this to be true after the
card was removed, but the author couldn't recreate it with the
workaround in place. The change is more conservative than the
previous code, but still has the work around that wasn't present in
the older code.
Bill Paul [Sun, 10 Aug 2003 01:41:35 +0000 (01:41 +0000)]
- Update some comments regarding hardware details of the 8169 and
note the existence of the 8169S and 8110S components. (The 8169
is just a MAC, the 8169S and 8110S contain both a MAC and PHY.)
- Properly handle list and buffer addresses as 64-bit. The RX and
TX DMA list addresses should be bus_addr_t's. Added RL_ADDR_HI()
and RL_ADDR_LO() macros to obtain values for writing into chip
registers.
- Set a slightly different TIMERINT value for 8169 NICs for improved
performance.
- Change left out of previous commit log: added some additional
hardware rev codes for other 10/100 chips and for the 8169S/8110S
'rev C' gigE MACs.
Bill Paul [Sun, 10 Aug 2003 01:32:16 +0000 (01:32 +0000)]
Silence unwanted 'gigabit link up' messages: do not treat the
BGE_MACSTAT_MI_COMPLETE bit in the MAC status register as a link
change indicator. We turn this bit on now because some of the newer
chips need it, but it usually just means that reading/writing
an MII/GMII register has completed, not that a link change has
occured.
Warner Losh [Sat, 9 Aug 2003 21:05:54 +0000 (21:05 +0000)]
Add code to cope more with strange conditions after careful study of
the standard.
1) When the bridge tells us that we have a card that isn't recognized, we
use the force register to force the CV_TEST to run. This test causes the
bridge to re-evaluate the card. Once this re-evaluation process happens,
we get a new interrupt that may say it is ready to process. We try this up
to 20 times. Tests have shown that this appears to correctly reset the
'Unknown card type' problem that I saw on my Sony PCG-505TS.
2) Take a page from OLDCARD and always read the CSC register in the ISR.
Some TI (and it seems maybe Ricoh) chipsets require this to behave
properly. This work around appears to work due to some power management
protocols that were improperly implemented. Maybe it can be removed when
this driver supports the full PME# protocol described in the standards.
3) Minor additional debug printf when debugging is enabled.
4) Minor additional commentary for things that are obvious only after study.
# I'm committing this from my Sony PCG-505TS using shared PCI interrupts
# and NEWCARD, but there are some issues with the Ricoh bridge still, but
# at least now I can boot with the card inserted and have it work.
Warner Losh [Sat, 9 Aug 2003 20:49:22 +0000 (20:49 +0000)]
CBB_SOCKET_STAT_ is too long. Change it to CBB_STATE_. Also, make
some minor changes to more closely match the bit names used in the 7.0
version of the PCMCIA standard. Also add bits from the FORCE
register.
Apparently I limited my testing of the ductape and bubblegum solution
to acpidb. The same problem exists in iasl. Add JIT patching there
too.
Add a comment to both makefiles to increase the chance that both
kludges are removed when a real solution is committed.
Alan Cox [Sat, 9 Aug 2003 18:01:19 +0000 (18:01 +0000)]
Background: When proc_rwmem() wired and mapped a page, it also added
a reference to the containing object. The purpose of the reference
being to prevent the destruction of the object and an attempt to free
the wired page. (Wired pages can't be freed.) Unfortunately, this
approach does not work. Some operations, like fork(2) that call
vm_object_split(), can move the wired page to a difference object,
thereby making the reference pointless and opening the possibility
of the wired page being freed.
A solution is to use vm_page_hold() in place of vm_page_wire(). Held
pages can be freed. They are moved to a special hold queue until the
hold is released.
o There are 6 trap disable bits in ar.fpsr, not five. Even though we
didn't provide a constant for one of them (non-IEEE denormal trap),
in an attempt to not support it probably, it's not we are left with
the lower 5 bits.
o Properly mask the passed or returned fp_except_t. Not doing so
causes instant core dumps by trying to write an invalid value to
ar.fpsr. Now that we're masking, stop using exclusive-or to invert
bits.
This fixes the illegal instruction fault encountered when building
mozilla.
Scott Long [Sat, 9 Aug 2003 15:16:45 +0000 (15:16 +0000)]
Call bus_dmamap_create() to create the per-SRB buffer maps. Note that none
of the SRB resources are freed when the driver unloads; maybe that will be
tackled another day.
Perform first-aid: unbreak the build for amd64 and ia64 by patching
osunixxf.c on the fly. This avoids having to pull it from the vendor
branch or otherwise pollute the repository with new short-lived files.
Mike Silbersack [Sat, 9 Aug 2003 02:55:11 +0000 (02:55 +0000)]
#ifdef INET6 the if_loop packet defrag; since only the ipv6 stack (might)
require this to be done, there's no reason to waste time doing it if
ipv6 isn't compiled in.
Fix sign-extension bug for 32 and 64-bit values. For 64-bit values
this involves the sign-extension of the high and low "word". Both
of which are 32-bit. The bug is especially harmful on ia64, where
0x9fffffffe0000000 is a common address (base of register stack).
This was invariably displayed as 0xffffffffe0000000.
The sign-extension is fixed by using {b|l}e{16|32|64}dec() where
applicable. Since elfdump(1) is not a bootstrap tool, dependency
on these functions is not a problem.
David Xu [Fri, 8 Aug 2003 22:20:59 +0000 (22:20 +0000)]
o Add code to GC freed KSEs and KSE groups
o Fix a bug in kse_free_unlocked(), kcb_dtor shouldn't be called because
the KSE is cached and will be resued in _kse_alloc().
Ruslan Ermilov [Fri, 8 Aug 2003 21:00:57 +0000 (21:00 +0000)]
Added the new knob MINIROOT that, when set, causes the creation
of the bootable UFS image, miniroot.ufs, fully identical to the
contents of the "bootonly" CD-ROM. The image is made available
on FTP as miniroot/miniroot.ufs.gz, for resemblance with NetBSD.
This replaces the boot.flp image for sparc64, making the latter
as coming with NO_FLOPPIES.
Fix two (2) bugs in one (1) statement:
o fix the len argument of memcmp(3) to be the size of the node field
of the uuid structure, not the size of the uuid structure itself.
We're comparing the node fields...
o uuid_compare(3) is specified to return -1, 0 or 1, depending on
the outcome of the comparison. memcmp(3) returns the difference
between the first differing bytes. Hence, we cannot ever return
the return value of memcmp(3) as-is.
PR: standards/55370
Submitted by: Konstantin Oznobihin <bork@rsu.ru>
Hajimu UMEMOTO [Fri, 8 Aug 2003 16:42:37 +0000 (16:42 +0000)]
Process the "O bit."
If the value of OtherConfigFlag changes from FALSE to TRUE, the
host should invoke the stateful autoconfiguration protocol,
requesting information.
[RFC 2462 Section 5.5.3]
Ruslan Ermilov [Fri, 8 Aug 2003 15:44:17 +0000 (15:44 +0000)]
Fix a bug that caused i386 to produce broken binaries for big-endian
64-bit platforms. (size_t is 32bit on i386, but Elf_Shdr.sh_size is
64bit on SPARC64.)
Allow gcc driver to process -r option iself, do not use -Wl,-r to
bypass it. Doing otherwise did not allow compiler to detect and disable
conflicting options generated from specs.
Bill Fumerola [Thu, 7 Aug 2003 21:27:17 +0000 (21:27 +0000)]
0) preallocate per-interface context structures without the ifnet lock held
1) avoid immediately calling bzero() after malloc() by passing M_ZERO
2) do not initialize individual members of the global context to zero
3) remove an unused assignment of ifctx in bootpc_init()