Alan Cox [Sat, 17 May 2008 19:32:48 +0000 (19:32 +0000)]
In order to map device memory using superpages, mmap(2) must find a
superpage-aligned virtual address for the mapping. Revision 1.65
implemented an overly simplistic and generally ineffectual method for
finding a superpage-aligned virtual address. Specifically, it rounds
the virtual address corresponding to the end of the data segment up to
the next superpage-aligned virtual address. If this virtual address
is unallocated, then the device will be mapped using superpages.
Unfortunately, in modern times, where applications like the X server
dynamically load much of their code, this virtual address is already
allocated. In such cases, mmap(2) simply uses the first available
virtual address, which is not necessarily superpage aligned.
This revision changes mmap(2) to use a more robust method,
specifically, the VMFS_ALIGNED_SPACE option that is now implemented by
vm_map_find().
Alan Cox [Sat, 17 May 2008 16:26:34 +0000 (16:26 +0000)]
Preset a device object's alignment ("pg_color") based upon the
physical address of the device's memory. This enables
pmap_align_superpage() to propose a virtual address for mapping the
device memory that permits the use of superpage mappings.
Colin Percival [Sat, 17 May 2008 15:55:29 +0000 (15:55 +0000)]
Add --keep-newer-files option (as in GNU tar: When in -x mode, ignore
files if the existing file is newer than the archive entry).
Currently if any files are ignored, bsdtar will exit with a non-zero
exit status; this is likely to change in the future, but requires some
API changes in libarchive.
Brooks Davis [Sat, 17 May 2008 03:38:13 +0000 (03:38 +0000)]
The if_check() function performed three actions:
- verified that the ifp->if_snd.ifq_mtx was initalized for
all attached interfaces. This was pointless because it was
initalized for all interfaces in if_attach() so I've removed it.
- Checked that ifp->if_snd.ifq_maxlen is initalized and set it to
ifqmaxlen if unset. This makes more sense in if_attach() so
I moved it there.
- The first call of if_slowtimo(). Delete if_check() and call
if_slowtimo() directly from the SYSINIT().
John Birrell [Sat, 17 May 2008 02:14:19 +0000 (02:14 +0000)]
Add the statically defined tracing header.
Note that this implementation differs from the one in OpenSolaris, so
it is BSD licensed and can be included anywhere.
The kernel definitions defined here are dependent on the kernel option
KDTRACE_HOOKS so that macros added to the sources are pre-processed
out completely when the DTrace kernel hooks aren't compiled in.
Markus Brueffer [Fri, 16 May 2008 22:31:17 +0000 (22:31 +0000)]
Fix and speedup timestamp calculations which is roughly based on the patch in
the mentioned PR:
- bounds check time->month as it is used as an array index
- fix usage of time->month as array index (month is 1-12)
- fix calculation based on time->day (day is 1-31)
- fix the speedup code as it doesn't calculate correct timestamps before
the year 2000 and reduce the number of calculation in the year-by-year code
- speedup month calculations by replacing the array content with cumulative
values
- add microseconds calculation
- fix an endian problem
Jack F Vogel [Fri, 16 May 2008 18:46:30 +0000 (18:46 +0000)]
This is driver version 1.4.4 of the Intel ixgbe driver.
-It has new hardware support
-It uses a new method of TX cleanup called Head Write Back
-It includes the provisional generic TCP LRO feature contributed
by Myricom and made general purpose by me. This should move into
the stack upon approval but for this driver drop its in here.
-Also bug fixes and etc...
John Baldwin [Fri, 16 May 2008 15:34:06 +0000 (15:34 +0000)]
Teach truss about 32-bit FreeBSD and Linux binaries on amd64. Some
additional work is needed to handle ABI-specific syscall argument parsing,
but this gets the basic tracing working.
Marcel Moolenaar [Fri, 16 May 2008 14:57:48 +0000 (14:57 +0000)]
Fix RID calculation. The RID is really the BAR for PCI cards,
so the index needs to be translated into an offset. While we
did add the offset (0x10), we forgot to account for the width.
Marius Strobl [Thu, 15 May 2008 20:27:18 +0000 (20:27 +0000)]
- Const'ify firmware and lookup-tables.
- Obsolete redundant inst_name and unit members of struct sym_hcb.
- Fix three more NULL vs. 0 confusions.
- Use device_set_softc(9) to tell the bus layer that this driver
allocates a instance of struct sym_hcb itself.
Attilio Rao [Thu, 15 May 2008 20:10:06 +0000 (20:10 +0000)]
- Embed the recursion counter for any locking primitive directly in the
lock_object, using an unified field called lo_data.
- Replace lo_type usage with the w_name usage and at init time pass the
lock "type" directly to witness_init() from the parent lock init
function. Handle delayed initialization before than
witness_initialize() is called through the witness_pendhelp structure.
- Axe out LO_ENROLLPEND as it is not really needed. The case where the
mutex init delayed wants to be destroyed can't happen because
witness_destroy() checks for witness_cold and panic in case.
- In enroll(), if we cannot allocate a new object from the freelist,
notify that to userspace through a printf().
- Modify the depart function in order to return nothing as in the current
CVS version it always returns true and adjust callers accordingly.
- Fix the witness_addgraph() argument name prototype.
- Remove unuseful code from itismychild().
This commit leads to a shrinked struct lock_object and so smaller locks,
in particular on amd64 where 2 uintptr_t (16 bytes per-primitive) are
gained.
Alan Cox [Thu, 15 May 2008 18:52:31 +0000 (18:52 +0000)]
Don't call vm_reserv_alloc_page() on device-backed objects. Otherwise, the
system may panic because there is no reservation structure corresponding to
the physical address of the device memory.
Philip Paeps [Thu, 15 May 2008 15:05:02 +0000 (15:05 +0000)]
Improve the virtual scrolling mechanism to make middle clicking less
difficult. Add a -L option (yet another option, indeed!) which changes the
speed of scrolling and change -U to only affect the scroll threshold.
This should make middle-clicking a much more pleasant experience.
Bruce M Simpson [Thu, 15 May 2008 11:00:23 +0000 (11:00 +0000)]
Add support for /conf/T/M/remount_optional.
The rc.initdiskless functionality is used by NanoBSD to allow configuration
files to live on a separate configuration slice, which acts as NVRAM, whilst
the system image is mounted read-only.
Normally, if the remount command fails during boot, this is regarded as
a fatal error. If /conf/T/M/remount_optional is present, this error is
non-fatal. If the file is not present, the default behaviour is unchanged.
This is very useful for people building live CD images using FreeBSD,
where the NVRAM lives somewhere completely differently from the system image,
and may be present on removable media which is not present during the
initial boot.
Weongyo Jeong [Thu, 15 May 2008 04:29:28 +0000 (04:29 +0000)]
Fix a panic when it occurred during initializing the ndis driver because
it try to read network address through ifnet structure which is NULL
until the ndis driver's initialization is finished.
John Baldwin [Thu, 15 May 2008 03:07:34 +0000 (03:07 +0000)]
Go back to using the process command name (p_comm) for the file name and
command line arguments stored in the note at the beginning of a core dump
instead of the current thread name.
Brooks Davis [Thu, 15 May 2008 01:06:10 +0000 (01:06 +0000)]
Change the default value of synchronous_dhclient to NO.
To preserve the existing behavior of etc/rc.d/netif, add code to wait
up to if_up_delay seconds (30 seconds by default) for a default route to
be configured if there are any dhcp interfaces. This should be extended
to test that the interface is actually up.
Marius Strobl [Wed, 14 May 2008 21:00:27 +0000 (21:00 +0000)]
Improve the integration of BCM5906[M] support:
- Rename BGE_FLAG_EEPROM to BGE_FLAG_EADDR to underline it's absence means
"there's no chip containing an Ethernet address fitted to the BGE chip
so we have to get it from the firmware instead" rather than "there's no
EEPROM, but maybe NVRAM or something else".
- Don't treat BCM5906[M] generally like chips w/o BGE_FLAG_EADDR set, just
in the two cases really necessary. This gets us line with the original
patch for DragonFlyBSD.
- For sparc64 restore the intended behavior of obtaining the Ethernet
address from the firmware in case BGE_FLAG_EADDR is not set, even for
BCM5906[M].
- Fix some style(9) bugs introduced with rev. 1.208 of if_bge.c
Approved by: jhb
Additional testing by: Thomas Nystroem (BCM5906)
Maksim Yevmenkin [Wed, 14 May 2008 16:47:30 +0000 (16:47 +0000)]
Make -t <tty> optional in server mode. If not specified use stdin/stdout.
Document this. Do not require channel number in server mode. If not
specified - bind to ''wildcard'' channel zero. Real channel number will
be obtained automatically and registered with local sdpd(8). While I'm
here fix serial port service registration.
Submitted by: luigi
Tested by: Helge Oldach <freebsd-bluetooth at oldach dot net>
MFC after: 3 days
Remko Lodder [Wed, 14 May 2008 00:22:57 +0000 (00:22 +0000)]
Fix pstat behaviour when using coredumps. The reference to tp was
incorrect and should have been poining to &tty, tp is a virtual
address from the coredump, while we should obtain the address through
the tty struct.
Approved by: imp (mentor, implicit trivial changes)
MFC after: 1 week
Submitted by: Ed Schouten (ed at 80836 dot nl)
Remko Lodder [Tue, 13 May 2008 21:51:02 +0000 (21:51 +0000)]
The first of thirteen patches by Ed that resolves a documentation
issue in termios.4, ttydefaults.h does not exist in /usr/include
but in /usr/include/sys.
MFC after: 3 days
Submitted by: Ed Schouten (ed at 80386 dot nl)
Marius Strobl [Tue, 13 May 2008 20:58:08 +0000 (20:58 +0000)]
Don't let hacksync() call bus_dmamap_sync(9) on DMA maps which
are not initialized. This fixes a panic on sparc64 where calling
bus_dmamap_sync(9) on NULL DMA maps is fatal.
Roman Divacky [Tue, 13 May 2008 20:01:27 +0000 (20:01 +0000)]
Implement robust futexes. Most of the code is modelled after
what Linux does. This is because robust futexes are mostly
userspace thing which we cannot alter. Two syscalls maintain
pointer to userspace list and when process exits a routine
walks this list waking up processes sleeping on futexes
from that list.
Olivier Houchard [Tue, 13 May 2008 14:00:09 +0000 (14:00 +0000)]
From the OpenBSD commit log :
Add support for the Apple USB Ethernet adapter.
Work around the "latch in at the first working PHY address hack",
that fails for this adapter because it returns 0xffff when reading
from lower PHY addresses. Also add more debugging printfs
Florent Thoumie [Mon, 12 May 2008 11:49:16 +0000 (11:49 +0000)]
Don't require a configuration file. Ntpd will be perfectly happy if there's
none or if the file doesn't exist (there's no ntp.conf in the base install).
Sam Leffler [Mon, 12 May 2008 00:32:52 +0000 (00:32 +0000)]
Update PLCP<->rate mapping support:
o correct mapping of CCK rates to PLCP; was using nonstandard Ralink
values which just happened to also be used by Zydas (so went unnoticed)
o change ieee80211_plcp2rate api to take a phy type instead of a flag
that indicates ofdm/!ofdm
o update drivers to match (restore per-driver code to map rate->PLCP)
Sam Leffler [Mon, 12 May 2008 00:15:30 +0000 (00:15 +0000)]
Minor cleanup of vap create work:
o add IEEE80211_C_STA capability to indicate sta mode is supported
(was previously assumed) and mark drivers as capable
o add ieee80211_opcap array to map an opmode to the equivalent capability bit
o move IEEE80211_C_OPMODE definition to where capabilities are defined so it's
clear it should be kept in sync (on future additions)
o check device capabilities in clone create before trying to create a vap;
this makes driver checks unneeded
o make error codes return on failed clone request unique
o temporarily add console printfs on clone request failures to aid in
debugging; these will move under DIAGNOSTIC or similar before release
Rui Paulo [Sun, 11 May 2008 23:14:07 +0000 (23:14 +0000)]
Don't use libkern's max() function as that's for unsigned numbers only.
Instead use the worldwide known MAX() function.
This should fix problems with negative values showing up on
dev.cpu.%d.temperature.
This is slightly different from the fix in the PR.
Submitted by: KOIE Hidetaka <hide at koie.org>
PR: 123542
Alan Cox [Sun, 11 May 2008 20:33:47 +0000 (20:33 +0000)]
Correct an error in pmap_align_superpage(). Specifically, correctly
handle the case where the mapping is greater than a superpage in size
but the alignment of the physical pages spans a superpage boundary.