Commit Graph

173409 Commits

Author SHA1 Message Date
Warner Losh
6859e74003 Use the RTC unit to get the time. This works on all known AT91SAM9*
processors, either on reboot or after power down with battery backup.
However, the AT91RM9200 RTC always resets on reboot making it just
about useless at the moment (if we support a low-power mode or an
extended sleep mode, it might become useful).

Submitted by:	Ian Lepore
2012-10-07 01:58:32 +00:00
Andriy Gapon
d50aaa6d6d ata_da: set disk::d_ident from serial number
MFC after:	10 days
2012-10-06 21:42:07 +00:00
Andriy Gapon
391bdfb835 procstat_getprocs: honor kvm_getprocs interface - cnt is signed
MFC after:	10 days
2012-10-06 20:17:28 +00:00
Andriy Gapon
ca895af355 kvm_getprocs: gracefully handle errors from kvm_deadprocs
and don't confuse callers with incorrect return value

MFC after:	9 days
2012-10-06 20:16:04 +00:00
Andriy Gapon
9fb9ea1c03 kvm_proclist: ignore processes in larvae state
Reviewed by:	jhb
MFC after:	8 days
2012-10-06 20:12:24 +00:00
Andriy Gapon
38ba6e6ae5 add detection of serial console presence to btx and boot2-like blocks
Note that this commit slightly increases size of boot blocks.

Reviewed by:	jhb
Tested by:	Olivier Cochard-Labbe <olivier@cochard.me>
MFC after:	26 days
2012-10-06 20:08:29 +00:00
Andriy Gapon
fdb3d7b169 i386 comconsole: don't loop forever if hardware doesn't respond
- clear capability flags when hw timeouts
- retire comc_started status variable and directly use c_flags to see
  if comconsole is selected for use

Reviewed by:	jhb
Tested by:	Uffe Jakobsen <uffe@uffe.org>,
		Olivier Cochard-Labbe <olivier@cochard.me>
MFC after:	26 days
2012-10-06 20:04:51 +00:00
Andriy Gapon
4ecbcb6f49 boot/console: handle consoles that fail to probe
- clarify meaning of console flags
- perform i/o via a console only if both of the following conditions are met:
   o console is active (selected by user or config)
   o console flags that it can perform the operation
- warn if a chosen console can not work (the warning may go nowhere without
  working and active console, though)

Reviewed by:	jhb
Tested by:	Uffe Jakobsen <uffe@uffe.org>,
		Olivier Cochard-Labbe' <olivier@cochard.me>
MFC after:	26 days
2012-10-06 20:01:17 +00:00
Marcel Moolenaar
0815243c39 Add support for bmake. This includes:
1.  Don't do upgrade_checks when using bmake. As long as we have WITH_BMAKE,
    there's a bootstrap complication in ths respect. Avoid it. Make the
    necessary changes to have upgrade_checks work wth bmake anyway.
2.  Remove the use of -E. It's not needed in our build because we use ?= for
    the respective variables, which means that we'll take the environment
    value (if any) anyway.
3.  Properly declare phony targets as phony as bmake is a lot smarter (and
    thus agressive) about build avoidance.
4.  Make sure CLEANFILES is complete and use it on .NOPATH. bmake is a lot
    smarter about build avoidance and should not find files we generate in
    the source tree. We should not have files in the repository we want to
    generate, but this is an easier way to cross this hurdle.
5.  Have behavior under bmake the same as it is under make with respect to
    halting when sub-commands fail. Add "set -e" to compound commands so
    that bmake is informed when sub-commands fail.
6.  Make sure crunchgen uses the same make as the rest of the build. This
    is important when the make utility isn't called make (but bmake for
    example).
7.  While here, add support for using MAKEOBJDIR to set the object tree
    location. It's the second alternative bmake looks for when determining
    the actual object directory (= .OBJDIR).

Submitted by:	Simon Gerraty <sjg@juniper.net>
Submitted by:	John Van Horne <jvanhorne@juniper.net>
2012-10-06 20:01:05 +00:00
Andriy Gapon
8bf749ef3a zvol: set mediasize in geom provider right upon its creation
... instead of deferring the action until first open.
Unlike upstream this has no benefit on FreeBSD.
We know that as soon as the provider is created it is going to be tasted
and thus opened.  Initial mediasize of zero causes tasting failure
and subsequent retasting because of the size change.

MFC after:	14 days
2012-10-06 19:57:27 +00:00
Andriy Gapon
a90c9dfeab g_part_taste: directly destroy consumer and geom here, no need for withering
Besides withered but still alive consumers may interfere with
re-tatsing.

MFC after:	16 days
2012-10-06 19:52:50 +00:00
Andriy Gapon
298fbd1605 cngetc: use cpu_spinwait to ease the cncheckc loop a tiny bit
Reviewed by:	julian
MFC after:	10 days
2012-10-06 19:50:23 +00:00
Andriy Gapon
9d200697d7 zfsboot: simplify probe_drive() a little bit
The first discovered pool, whether it covers the whole boot disk or not,
is going to be first in zfs_pools list.  So there is no need at all
for spapp parameter.

This commit also fixes a bug where NULL would be assigned to NULL
pointer when probe_drive was called  with the spapp parameter of NULL.

MFC after:	21 days
2012-10-06 19:48:15 +00:00
Andriy Gapon
aae0c9de03 zfs boot: export boot/primary pool and vdev guid all the way to kenv
This is work in progress to for znextboot and it also provides
some convenient infrastructure.

MFC after:	20 days
2012-10-06 19:47:24 +00:00
Andriy Gapon
d39075208e zfs loader: treat plain pool name as a name of its root dataset
... as opposed to the previous behavior of treating it as boot
dataset (specified by bootfs or default)

MFC after:	19 days
2012-10-06 19:42:50 +00:00
Andriy Gapon
edfd4fce8f zfs boot spa_status: print bootfs for each reported pool
MFC after:	9 days
2012-10-06 19:42:05 +00:00
Andriy Gapon
164efe4010 boot/zfs: a small whitespace cleanup
MFC after:	5 days
2012-10-06 19:41:11 +00:00
Andriy Gapon
62c725a9db boot/zfs: call zfs_spa_init for all found pools
... and drop those for which it fails.
Also, add more sanity checking to the function.

MFC after:	16 days
2012-10-06 19:40:12 +00:00
Andriy Gapon
f152e0b5be zfsboot: use the same zfs dataset naming format as loader
Also, pool name alone now names a root dataset of the pool regardless
of bootfs property value.

MFC after:	15 days
2012-10-06 19:38:33 +00:00
Alan Cox
4ed2e31f01 In general pmap implementations do not set the wired attribute on
the temporary mappings that are used to implement operations like
pmap_zero_page().  There is no reason for the MIPS pmap to deviate
from that practice.
2012-10-06 19:33:52 +00:00
Andriy Gapon
61e100ee3b zfs_mount: taste geom providers for root pool config
This should allow to mount a dataset as a root filesystem even if
it belongs to a pool that is not described in zpool.cache.
This adds some overhead to the boot process though.

If the root filesystem's pool is found in zpool.cache, the by default
its cached configuration will be used for import.
vfs.zfs.rootpool.prefer_cached_config could be set to zero to force
the config to be retasted.

Discussed with:	gibbs, pjd, des
MFC after:	25 days
2012-10-06 19:33:47 +00:00
Marcel Moolenaar
a046473b9c Update to include WITH_BMAKE. 2012-10-06 19:28:19 +00:00
Andriy Gapon
296e021066 zfs boot: add lszfs command to i386 loader
... to list child datasets of a specified dataset.
Dataset name should be provided in poolname/dsname format.

MFC after:	17 days
2012-10-06 19:27:54 +00:00
Andriy Gapon
74b3e265c7 zfs boot: add code for listing child datasets of a given dataset
- only filesystem datasets are supported
- children names are printed to stdout

To do: allow to iterate over the list and fetch names programatically

MFC after:	17 days
2012-10-06 19:27:04 +00:00
Andriy Gapon
84b339ac4c zfs boot: chose a "first" pool if none is explicitly requested
MFC after:	8 days
2012-10-06 19:25:40 +00:00
Andriy Gapon
c331c9703c ktrace/kern_exec: check p_tracecred instead of p_cred
.. when deciding whether to continue tracing across suid/sgid exec.
Otherwise if root ktrace-d an unprivileged process and the processed
exec-ed a suid program, then tracing didn't continue across exec.

Reviewed by:	bde, kib
MFC after:	22 days
2012-10-06 19:23:44 +00:00
Andriy Gapon
09606b760a make: report :M or :N pattern in debug mode
MFC after:	12 days
2012-10-06 19:19:32 +00:00
Marcel Moolenaar
d4d90f10bc Add bmake to the build and allow it to be installed as make(1) instead
of FreeBSD's make by setting WITH_BMAKE.  The WITH_BMAKE build makes it
easy for people to switch while working out the kinks -- think ports
tree here.  The option will be removed in due time.

Submitted by:	Simon Gerraty (sjg@juniper.net)
2012-10-06 19:19:21 +00:00
Alan Cox
948aea4031 Correct two pessimizations in pmap_extract_and_hold(). Test the PTE for
having PTE_RO set instead of PTE_D.  This avoids some unnecessary failures
by pmap_extract_and_hold() that will have to be handled by a call to
vm_fault_hold().  Testing the PTE for both being non-zero and having PTE_V
set is redundant.  The latter suffices.
2012-10-06 19:05:50 +00:00
Tim Kientzle
5847daf4c2 Fix "make install"
Also make arm the same as other platforms:  Install man
pages for all CPUs in the family.
2012-10-06 17:54:42 +00:00
Gleb Smirnoff
21d172a3f1 A step in resolving mess with byte ordering for AF_INET. After this change:
- All packets in NETISR_IP queue are in net byte order.
  - ip_input() is entered in net byte order and converts packet
    to host byte order right _after_ processing pfil(9) hooks.
  - ip_output() is entered in host byte order and converts packet
    to net byte order right _before_ processing pfil(9) hooks.
  - ip_fragment() accepts and emits packet in net byte order.
  - ip_forward(), ip_mloopback() use host byte order (untouched actually).
  - ip_fastforward() no longer modifies packet at all (except ip_ttl).
  - Swapping of byte order there and back removed from the following modules:
    pf(4), ipfw(4), enc(4), if_bridge(4).
  - Swapping of byte order added to ipfilter(4), based on __FreeBSD_version
  - __FreeBSD_version bumped.
  - pfil(9) manual page updated.

Reviewed by:	ray, luigi, eri, melifaro
Tested by:	glebius (LE), ray (BE)
2012-10-06 10:02:11 +00:00
Gleb Smirnoff
ea2951beed The pfil(9) layer guarantees us presence of the protocol header,
so remove extra check, that is always false.

P.S. Also, goto there lead to unlocking a not locked rwlock.
2012-10-06 07:06:57 +00:00
Joel Dahl
3dacd67e46 mdoc: begin sentences on a new line. 2012-10-06 06:07:33 +00:00
Joel Dahl
be15d0e4dc Minor mdoc fix. 2012-10-06 06:02:29 +00:00
Joel Dahl
9a09c4db0e Remove trailing whitespace. 2012-10-06 05:54:41 +00:00
Xin LI
d09a7e67b9 MFV: tcpdump 4.3.0.
MFC after:	4 weeks
2012-10-05 20:19:28 +00:00
Xin LI
15752fa858 MFV: libpcap 1.3.0.
MFC after:	4 weeks
2012-10-05 18:42:50 +00:00
Martin Cracauer
93a2fe45a6 Allow time offsets to be negative, e.g. at 1530 - 15 minutes.
This is useful if you have been given some time for some event in some
format and you want your computer to do something to prepare for it.
Without having to do time arithmetic in a shellscript.

The syntax matches what the at(1) usually used on Linux supports.
2012-10-05 17:54:27 +00:00
Adrian Chadd
943e37a120 Initialise an uninitialised variable. 2012-10-05 16:44:00 +00:00
John Baldwin
f8d6c20a0f Further adjust the workaround in r234501. Rounding all small requests up
to 32k swamped the controller causing firmware hangs.  Instead, round
requests smaller than 64k up to the next power of 2 as a general rule.
To handle the one known special case of a command that accepts a 12k
buffer returning a 24k-ish reply, round requests between 8k and 16k up
to 32k rather than 16k.  The result is that commands less than 8k should
now be rounded up to a smaller size (either 4k or 8k) rather than 32k.

PR:		kern/155658
Tested by:	Andreas Longwitz
MFC after:	1 week
2012-10-05 15:52:31 +00:00
Andriy Gapon
102548d143 mount.h: MNTK_VGONE_UPPER and MNTK_VGONE_WAITER were supposed to be different
... otherwise a waiter is never woken up.

Reported by:	swills
Discussed with:	jhb
Approved by:	kib
MFC after:	3 days
2012-10-05 14:42:38 +00:00
Gleb Smirnoff
ffe9c13e2a Provide ability for printing and decoding pfsync(4) traffic. This
doesn't mean supporting IFT_PFSYNC (which I hope will eventually
die). This means decoding packets with IP protocol of 240 caught
on any normal interface like Ethernet.

  The code is based on couple of files from OpenBSD, significantly
modified by myself.

  Parser differentiates for four levels of verbosity: no -v, -v,
-vv and -vvv.

  We don't yet forward this code upstream, because currently it
strongly relies on if_pfsync.h and even on pfvar.h. I hope that
this can be fixed in future.

Reviewed by:	gnn, delphij
2012-10-05 07:51:21 +00:00
Pyun YongHyeon
a6e66cd28b Follow Broadcom datasheet:
Delay 100 microseconds after enabling transmit MAC.
 Delay 10 microseconds after enabling receive MAC.
2012-10-05 07:13:21 +00:00
Pyun YongHyeon
9b80ffe78f Add 40 microseconds delay after updating EMAC Mode register as
recommended by Broadcom data sheet.
2012-10-05 06:24:22 +00:00
Doug Barton
3aec794146 Remove references to CVS so that people will stop bringing it up
For -p:
	The localtime update should have been excluded in the first place

	The make.conf comparison has been OBE for some time now, and there
	is no src.conf equivalent to share/examples/make.conf, so remove
	the whole thing.

Update copyright
2012-10-05 05:01:42 +00:00
Alan Cox
d68ca35a82 Eliminate a stale and a duplicated comment. 2012-10-05 04:35:20 +00:00
Pyun YongHyeon
a0a03d1e82 APE firmware touches EMAC Mode and TX/RX MAC Mode registers to keep
the MAC connected to the outside world.  So keep the accesses
atomic.
2012-10-05 03:46:25 +00:00
Pyun YongHyeon
e4146b9510 Don't touch EMAC Mode and TX/RX MAC Mode register when driver is
not running.
2012-10-05 03:35:38 +00:00
Jung-uk Kim
430849e1b9 Do not install incomplete unwind.h from clang. This header file was meant
to be a wrapper for the canonical system header file.  Unfortunately, we do
not have one (yet) and some times it is causing weird failures when clang
is used for building ports.  More complete and correct file will come from
libcxxrt in the future.

Discussed with:	dim, kib, theraven
MFC after:	1 week
2012-10-05 00:35:13 +00:00
Xin LI
0de8253a2f Vendor import of tcpdump 4.3.0. 2012-10-04 22:40:22 +00:00