]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agorepair build for dev/cs.
sbruno [Mon, 28 Oct 2013 16:27:01 +0000 (16:27 +0000)]
repair build for dev/cs.

Reported by: Outback Dingo <outbackdingo@gmail.com>

10 years agoRemove more remnants of ng_fec(4).
glebius [Mon, 28 Oct 2013 16:21:31 +0000 (16:21 +0000)]
Remove more remnants of ng_fec(4).

The ng_create_one() and ng_mkpeer() functions in network.subr are
now not used anywhere, but I left them, since they can be useful
in future in netgraph scripting.

Submitted by: pluknet

10 years agoRemove ng_fec.4
glebius [Mon, 28 Oct 2013 15:38:26 +0000 (15:38 +0000)]
Remove ng_fec.4

Submitted by: Dmitry Luhtionov <dmitryluhtionov gmail.com>

10 years agoSweep up a bit of arm-land fallout after r257244; include necessary
ian [Mon, 28 Oct 2013 15:20:17 +0000 (15:20 +0000)]
Sweep up a bit of arm-land fallout after r257244; include necessary
headers directly that are no longer available via accidental include.

10 years agoRemove ng_fec(4).
glebius [Mon, 28 Oct 2013 15:17:41 +0000 (15:17 +0000)]
Remove ng_fec(4).

10 years agoFix build. We need to include systm.h before if_var.h.
glebius [Mon, 28 Oct 2013 15:11:37 +0000 (15:11 +0000)]
Fix build. We need to include systm.h before if_var.h.

Pointy hat to: glebius

10 years agoRemove ng_fec(4).
glebius [Mon, 28 Oct 2013 14:52:08 +0000 (14:52 +0000)]
Remove ng_fec(4).

10 years agoRemove ng_fec(4).
glebius [Mon, 28 Oct 2013 14:47:33 +0000 (14:47 +0000)]
Remove ng_fec(4).

10 years agoImport the driver for VT-d DMAR hardware, as specified in the revision
kib [Mon, 28 Oct 2013 13:33:29 +0000 (13:33 +0000)]
Import the driver for VT-d DMAR hardware, as specified in the revision
1.3 of Intelб╝ Virtualization Technology for Directed I/O Architecture
Specification.  The Extended Context and PASIDs from the rev. 2.2 are
not supported, but I am not aware of any released hardware which
implements them.  Code does not use queued invalidation, see comments
for the reason, and does not provide interrupt remapping services.

Code implements the management of the guest address space per domain
and allows to establish and tear down arbitrary mappings, but not
partial unmapping.  The superpages are created as needed, but not
promoted.  Faults are recorded, fault records could be obtained
programmatically, and printed on the console.

Implement the busdma(9) using DMARs.  This busdma backend avoids
bouncing and provides security against misbehaving hardware and driver
bad programming, preventing leaks and corruption of the memory by wild
DMA accesses.

By default, the implementation is compiled into amd64 GENERIC kernel
but disabled; to enable, set hw.dmar.enable=1 loader tunable.  Code is
written to work on i386, but testing there was low priority, and
driver is not enabled in GENERIC.  Even with the DMAR turned on,
individual devices could be directed to use the bounce busdma with the
hw.busdma.pci<domain>:<bus>:<device>:<function>.bounce=1 tunable.  If
DMARs are capable of the pass-through translations, it is used,
otherwise, an identity-mapping page table is constructed.

The driver was tested on Xeon 5400/5500 chipset legacy machine,
Haswell desktop and E5 SandyBridge dual-socket boxes, with ahci(4),
ata(4), bce(4), ehci(4), mfi(4), uhci(4), xhci(4) devices.  It also
works with em(4) and igb(4), but there some fixes are needed for
drivers, which are not committed yet.  Intel GPUs do not work with
DMAR (yet).

Many thanks to John Baldwin, who explained me the newbus integration;
Peter Holm, who did all testing and helped me to discover and
understand several incredible bugs; and to Jim Harris for the access
to the EDS and BWG and for listening when I have to explain my
findings to somebody.

Sponsored by: The FreeBSD Foundation
MFC after: 1 month

10 years agong_fec(4) removed.
glebius [Mon, 28 Oct 2013 12:49:07 +0000 (12:49 +0000)]
ng_fec(4) removed.

10 years agoAxe ng_fec(4). It has never been a real netgraph(4) module, since
glebius [Mon, 28 Oct 2013 12:47:05 +0000 (12:47 +0000)]
Axe ng_fec(4). It has never been a real netgraph(4) module, since
it had no hooks. It has abused ifnet's if_afdata slot and actually
abused every subsystem it touched.

lagg(4) is a proper trunking solution at ifnet(9) layer.

ng_one2many(4) is a proper trunking solution in netgraph(4).

10 years agoFix the build with gcc.
markj [Mon, 28 Oct 2013 12:42:27 +0000 (12:42 +0000)]
Fix the build with gcc.

10 years ago- Fix VIMAGE build.
glebius [Mon, 28 Oct 2013 10:12:19 +0000 (10:12 +0000)]
- Fix VIMAGE build.
- Fix build with gcc.

10 years ago- Make the prophecy from 1997 happen and remove if_var.h inclusion
glebius [Mon, 28 Oct 2013 08:03:40 +0000 (08:03 +0000)]
- Make the prophecy from 1997 happen and remove if_var.h inclusion
  from if.h.
- Remove unnecessary includes and declarations from if.h
- Remove unnecessary includes and declarations from if_var.h [1]
- Mark some declarations that are about to be removed in near
  future with comments, explaning why this declaration is still
  necessary.
- Protect eventhandler declarations with #ifdef SYS_EVENTHANDLER_H.

Obtained from: bdeBSD [1]
Sponsored by: Netflix
Sponsored by: Nginx, Inc.

10 years agoInstead of putting ifnet declaration into eventhandler.h, move
glebius [Mon, 28 Oct 2013 07:45:03 +0000 (07:45 +0000)]
Instead of putting ifnet declaration into eventhandler.h, move
bpf(4) and vlan(4) related event declarations to bpf.h and
if_vlan_var.h. To avoid dependency on eventhandler.h, protect
these declarations with ifdef SYS_EVENTHANDLER_H.

Sponsored by: Netflix
Sponsored by: Nginx, Inc.

10 years agoInclude necessary headers that now are available due to pollution
glebius [Mon, 28 Oct 2013 07:29:16 +0000 (07:29 +0000)]
Include necessary headers that now are available due to pollution
via if_var.h.

Sponsored by: Netflix
Sponsored by: Nginx, Inc.

10 years agoRun mvs SATA driver on Armada XP instead of old mv_sata
zbb [Mon, 28 Oct 2013 07:18:24 +0000 (07:18 +0000)]
Run mvs SATA driver on Armada XP instead of old mv_sata

The mvs driver seems to be more functional than mv_sata and is not
causing random interrupt storms during boot.

10 years agoCorrect ld(1) manual page for --no-add-needed set as default after r253839
rea [Mon, 28 Oct 2013 05:55:47 +0000 (05:55 +0000)]
Correct ld(1) manual page for --no-add-needed set as default after r253839

Approved by: dim
MFC after: 2 weeks

10 years agoQuiesce warning -Wmissing-variable-declarations from buildworld, which is
sbruno [Mon, 28 Oct 2013 02:36:34 +0000 (02:36 +0000)]
Quiesce warning -Wmissing-variable-declarations from buildworld, which is
slightly unnerving.

In file included from ioctl.c:48:
/var/tmp/home/sbruno/bsd/head/tmp/usr/include/dev/lmc/if_lmc.h:939:13:
warning: no previous extern declaration for non-static variable 'ssi_cables'
[-Wmissing-variable-declarations]
const char *ssi_cables[] =

10 years agoRemove an incorrect debug printf.
markj [Mon, 28 Oct 2013 01:41:59 +0000 (01:41 +0000)]
Remove an incorrect debug printf.

10 years agoWith r247602, the "c" flag is no longer printed as a file descriptor flag.
markj [Mon, 28 Oct 2013 00:20:30 +0000 (00:20 +0000)]
With r247602, the "c" flag is no longer printed as a file descriptor flag.

Reviewed by: pjd
MFC after: 3 days

10 years agoUse the size of the MACHINE_ARCH string instead of sizeof(uint32_t). It can
cognet [Sun, 27 Oct 2013 23:48:59 +0000 (23:48 +0000)]
Use the size of the MACHINE_ARCH string instead of sizeof(uint32_t). It can
happen sizeof(MACHINE_ARCH) is more than 4 bytes, and bad things would
happen. This should make the ctors being called again on armeb.

10 years agoMake sure the PCB is aligned on 8 bytes, we may use ldrd/strd to access it,
cognet [Sun, 27 Oct 2013 22:15:50 +0000 (22:15 +0000)]
Make sure the PCB is aligned on 8 bytes, we may use ldrd/strd to access it,
which may have strong alignment requirements.

10 years agoAdd a virtual table for the busdma methods on x86, to allow different
kib [Sun, 27 Oct 2013 22:05:10 +0000 (22:05 +0000)]
Add a virtual table for the busdma methods on x86, to allow different
busdma implementations to coexist.  Copy busdma_machdep.c to
busdma_bounce.c, which is still a single implementation of the busdma
interface on x86 for now.  The busdma_machdep.c only contains common
and dispatch code.

Tested by: pho (as part of the larger patch)
Sponsored by: The FreeBSD Foundation
MFC after: 1 month

10 years agoAdd bus_dmamap_load_ma() function to load map with the array of
kib [Sun, 27 Oct 2013 21:39:16 +0000 (21:39 +0000)]
Add bus_dmamap_load_ma() function to load map with the array of
vm_pages.  Provide trivial implementation which forwards the load to
_bus_dmamap_load_phys() page by page.  Right now all architectures use
bus_dmamap_load_ma_triv().

Tested by: pho (as part of the functional patch)
Sponsored by: The FreeBSD Foundation
MFC after: 1 month

10 years agoImport pf_print_state.c 1.54 from OpenBSD
bapt [Sun, 27 Oct 2013 21:07:37 +0000 (21:07 +0000)]
Import pf_print_state.c 1.54 from OpenBSD

Original log:
pfctl -ss printed state levels for ICMPv6. Disable this the same
way it has already been done for ICMPv4.

Difference with OpenBSD:
- WITHOUT_INET6 safe

Obtained from: OpenBSD

10 years agoedquota: Don't pass fd for temporary file to editor.
jilles [Sun, 27 Oct 2013 21:06:17 +0000 (21:06 +0000)]
edquota: Don't pass fd for temporary file to editor.

The editor opens the temporary file by name.

10 years agoImport pf.c 1.638 from OpenBSD
bapt [Sun, 27 Oct 2013 20:56:23 +0000 (20:56 +0000)]
Import pf.c 1.638 from OpenBSD

Original log:
Some ICMP types that also have icmp_id, pointed out by markus@

Obtained from: OpenBSD

10 years agoImprot pf.c 1.636 from OpenBSD
bapt [Sun, 27 Oct 2013 20:52:09 +0000 (20:52 +0000)]
Improt pf.c 1.636 from OpenBSD

Original log:
Make sure pd2 has a pointer to the icmp header in the payload; fixes
panic seen with some some icmp types in icmp error message payloads.

Obtained from: OpenBSD

10 years agoImport pf.c 1.635 and pf_lb.c 1.4 from OpenBSD
bapt [Sun, 27 Oct 2013 20:44:42 +0000 (20:44 +0000)]
Import pf.c 1.635 and pf_lb.c 1.4 from OpenBSD

Stricter state checking for ICMP and ICMPv6 packets: include the ICMP type

in one port of the state key, using the type to determine which
side should be the id, and which should be the type. Also:
- Handle ICMP6 messages which are typically sent to multicast
  addresses but recieve unicast replies, by doing fallthrough lookups
  against the correct multicast address.  - Clear up some mistaken
  assumptions in the PF code:
- Not all ICMP packets have an icmp_id, so simulate
  one based on other data if we can, otherwise set it to 0.
  - Don't modify the icmp id field in NAT unless it's echo
  - Use the full range of possible id's when NATing icmp6 echoy

Difference with OpenBSD version:
- C99ify the new code
- WITHOUT_INET6 safe

Reviewed by: glebius
Obtained from: OpenBSD

10 years agoClean up the debug printing in libproc a bit. In particular:
markj [Sun, 27 Oct 2013 20:39:10 +0000 (20:39 +0000)]
Clean up the debug printing in libproc a bit. In particular:

* Don't print any error messages to stderr unless DEBUG is defined.
* Add a DPRINTFX macro for use when errno isn't set.
* Print the error string from libelf when appropriate.

10 years agoFix typo.
kib [Sun, 27 Oct 2013 18:52:09 +0000 (18:52 +0000)]
Fix typo.

MFC after: 3 days

10 years agoProvide forward declaration for struct ifnet. Consumers
glebius [Sun, 27 Oct 2013 17:27:06 +0000 (17:27 +0000)]
Provide forward declaration for struct ifnet. Consumers
of this header don't need contents of struct.

10 years agoAlmost all if_clone consumers do not care about if_clone_event.
glebius [Sun, 27 Oct 2013 17:14:33 +0000 (17:14 +0000)]
Almost all if_clone consumers do not care about if_clone_event.
Do not force them to include sys/eventhandler.h. Those who
utilize EVENTHANDLER(9), will see the declaration.

10 years agoInclude lock.h before mutex.h.
glebius [Sun, 27 Oct 2013 17:12:31 +0000 (17:12 +0000)]
Include lock.h before mutex.h.

10 years agoRemove the last dregs of trapframe_t. It turns out only arm was using
ian [Sun, 27 Oct 2013 17:09:23 +0000 (17:09 +0000)]
Remove the last dregs of trapframe_t.  It turns out only arm was using
this type, so remove it to make arm code more consistant with other
platforms.  Thanks to bde@ for pointing out only arm used trapframe_t.

10 years agoSeveral small fixes for the amd64 minidump code.
kib [Sun, 27 Oct 2013 16:31:12 +0000 (16:31 +0000)]
Several small fixes for the amd64 minidump code.

In report_progress(), use nitems(progress_track) instead of manually
hard-coding array size.  Wrap long line.

In blk_write(), code verifies that ptr and pa cannot be non-zero
simultaneously.  The later check for the page-alignment of the ptr
argument never triggers due to pa != 0 always implying ptr == NULL.  I
believe that the intent was to ensure that physicall address passed is
page-aligned, since the address is (temporary) mapped for the duration
of the page write.

Clear the progress_track.visited fields when starting minidump.  If
minidump is restarted or taken second time during the system lifetime,
progress is not printed otherwise, making operator suspectible to the
dump status.

Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

10 years agoMove new pf includes to the pf directory. The pfvar.h remain
glebius [Sun, 27 Oct 2013 16:25:57 +0000 (16:25 +0000)]
Move new pf includes to the pf directory. The pfvar.h remain
in net, to avoid compatibility breakage for no sake.

The future plan is to split most of non-kernel parts of
pfvar.h into pf.h, and then make pfvar.h a kernel only
include breaking compatibility.

Discussed with: bz

10 years agoWhen reentering kdb, typically due to a bug causing trap or assert in
kib [Sun, 27 Oct 2013 16:20:52 +0000 (16:20 +0000)]
When reentering kdb, typically due to a bug causing trap or assert in
the code executed in the context of debugger, do not be ashamed to
inform loudly about the re-entry.  Also, print the backtrace before
obliterating current stack with longjmp, allowing the operator to see
a place which caused the bug.

The change should make it less mysterious debugging the ddb itself.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

10 years agoIf the initial attempt to open /dev/ksyms fails, kldload the ksyms module
markj [Sun, 27 Oct 2013 16:18:48 +0000 (16:18 +0000)]
If the initial attempt to open /dev/ksyms fails, kldload the ksyms module
and retry.

10 years agoConvert the lockstat(1) man page to mdoc and make sure that it gets
markj [Sun, 27 Oct 2013 16:01:11 +0000 (16:01 +0000)]
Convert the lockstat(1) man page to mdoc and make sure that it gets
installed. Additionally, remove Solaris-specific sections and references,
and replace example outputs with output from lockstat on FreeBSD, since
lockstat's output contains stack traces.

This change also removes some examples that don't seem to work properly on
FreeBSD. The examples should be re-added when lockstat is fixed.

Reported by: avg
MFC after: 1 week

10 years agoAlways build ubldr as a soft-float binary as there is no support for VFP
andrew [Sun, 27 Oct 2013 14:27:11 +0000 (14:27 +0000)]
Always build ubldr as a soft-float binary as there is no support for VFP
this early on in the boot process.

10 years agoTurn on VM_KMEM_SIZE_SCALE on 32-bit as well as 64-bit PowerPC.
nwhitehorn [Sun, 27 Oct 2013 14:03:51 +0000 (14:03 +0000)]
Turn on VM_KMEM_SIZE_SCALE on 32-bit as well as 64-bit PowerPC.

Requested by: alc
MFC after: 1 month

10 years agoUpdate the hard-float version of the fenv functions to use the VFP unit.
andrew [Sun, 27 Oct 2013 10:44:22 +0000 (10:44 +0000)]
Update the hard-float version of the fenv functions to use the VFP unit.
Any other floating-point unit is unsupported on ARM.

10 years agoFix a deadlock when trying to power off a USB device. The deadlock
hselasky [Sun, 27 Oct 2013 10:09:53 +0000 (10:09 +0000)]
Fix a deadlock when trying to power off a USB device. The deadlock
happens because the code in question is trying to modify the parent
USB port registers outside the USB explore thread.

MFC after: 3 days

10 years agoMention in login.conf.5 which fields may be infinite and how to specifify infinity.
eadler [Sun, 27 Oct 2013 04:59:18 +0000 (04:59 +0000)]
Mention in login.conf.5 which fields may be infinite and how to specifify infinity.
The number of ways to indicate this confuses people.

PR: docs/100196
Reported by: "Dr. Markus Waldeck" <waldeck@gmx.de>
Reported by: Jamie Landeg Jones <jamie.landeg.jones@gmail.com>

10 years agoAll man pages refer to FreeBSD so there is no need to mention "In .Fx"
eadler [Sun, 27 Oct 2013 04:49:40 +0000 (04:49 +0000)]
All man pages refer to FreeBSD so there is no need to mention "In .Fx"

10 years agoEliminate a compiler warning about extraneous parens.
ian [Sun, 27 Oct 2013 03:29:38 +0000 (03:29 +0000)]
Eliminate a compiler warning about extraneous parens.

10 years agoOops, one more instance of ARM_NOCACHE_KVA_SIZE was hiding under the couch.
ian [Sun, 27 Oct 2013 03:24:46 +0000 (03:24 +0000)]
Oops, one more instance of ARM_NOCACHE_KVA_SIZE was hiding under the couch.
This should have been cleaned up along with r257201.

10 years agoRetire arm_remap_nocache() and the data and constants associated with it.
ian [Sun, 27 Oct 2013 03:13:26 +0000 (03:13 +0000)]
Retire arm_remap_nocache() and the data and constants associated with it.

The only remaining user was the code that allocates bounce pages for armv4
busdma.  It's not clear why bounce pages would need uncached memory, but
if that ever changes, kmem_alloc_attr() would be the way to get it.

10 years agoRemove #include <machine/frame.h> from all the arm code that doesn't
ian [Sun, 27 Oct 2013 01:34:10 +0000 (01:34 +0000)]
Remove #include <machine/frame.h> from all the arm code that doesn't
really need it.  That would be almost everywhere it was included.  Add
it in a couple files that really do need it and were previously getting
it by accident via another header.

10 years agoRemove all #include <machine/pmap.h> from arm code. It's already
ian [Sun, 27 Oct 2013 00:51:46 +0000 (00:51 +0000)]
Remove all #include <machine/pmap.h> from arm code.  It's already
included by vm/pmap.h, which is a prerequisite for arm/machine/pmap.h
so there's no reason to ever include it directly.

Thanks to alc@ for pointing this out.

10 years agoFix build after r257162.
nwhitehorn [Sat, 26 Oct 2013 23:41:11 +0000 (23:41 +0000)]
Fix build after r257162.

10 years agoMaximize available kva space by doing static device mapping from the top
ian [Sat, 26 Oct 2013 23:13:20 +0000 (23:13 +0000)]
Maximize available kva space by doing static device mapping from the top
of the address space downwards, and then returning the lowest mapped
device address from initarm_lastaddr().  This adds over 500MB of kva
space compared to the old way of hardcoding the end address as 0xE0000000.

Also, pre-map most of the SoC's common memory-mapped devices using 1MB
section mappings so that all device access uses just a few TLB entries.
Graphics devices aren't mapped this way yet, but probably should be.

To provide this new functionality without pasting identical code into
multiple imxNN_machdep.c files, rework the imx machdep code so that
things common to the whole family of SoCs are in a new imx_machdep.c file.
The rewritten imxNN_machdep.c files contain just things specific to an
individual SoC.

10 years agoMake devices with registers into the KVA region work reliably. Without this,
nwhitehorn [Sat, 26 Oct 2013 20:57:26 +0000 (20:57 +0000)]
Make devices with registers into the KVA region work reliably. Without this,
previous KVA allocations (which the PMAP lazily invalidates) in TLB0 could
shadow device maps in TLB1. Add a big block comment about some of the
caveats with this approach.

10 years agoTry even harder to find a console before giving up.
nwhitehorn [Sat, 26 Oct 2013 20:06:50 +0000 (20:06 +0000)]
Try even harder to find a console before giving up.

10 years agoFix build with GCC.
bdrewery [Sat, 26 Oct 2013 19:59:42 +0000 (19:59 +0000)]
Fix build with GCC.

BIO_new_mem_buf takes a void* buf, but internally it never modifies the
buf. It assigns the buffer to another pointer and then marks it as
read-only. So deconsting it should be safe here.

Also fix warning about 'buf' possibly being unused in parse_cert()

Approved by: bapt
MFC after: 2 days
X-MFC-With: r257147

10 years agoHandle (in a slightly ugly way) ePAPR-type loaders that just place a
nwhitehorn [Sat, 26 Oct 2013 19:50:40 +0000 (19:50 +0000)]
Handle (in a slightly ugly way) ePAPR-type loaders that just place a
device tree into r3. Rather than worrying about mapping that tree, reserving
its space in the global physical memory space, etc., just copy it to some
memory after the kernel.

10 years agoBump initial TLB size. The kernel is not necessarily less than 16 MB any
nwhitehorn [Sat, 26 Oct 2013 19:49:09 +0000 (19:49 +0000)]
Bump initial TLB size. The kernel is not necessarily less than 16 MB any
more.

10 years agoFix an itt instruction. We need to execute both the mov and b instructions
andrew [Sat, 26 Oct 2013 19:09:56 +0000 (19:09 +0000)]
Fix an itt instruction. We need to execute both the mov and b instructions
when building for Thumb.

10 years agoStart splitting pfvar.h into internal and external parts.
glebius [Sat, 26 Oct 2013 18:59:58 +0000 (18:59 +0000)]
Start splitting pfvar.h into internal and external parts.

- Provide pf_altq.h that has only stuff needed for ALTQ.
- Start pf.h, that would have all constant values and
  eventually non-kernel structures.
- Build ALTQ w/o pfvar.h, include if_var.h, that before
  came via pollution.
- Build tcpdump w/o pfvar.h.

Sponsored by: Netflix
Sponsored by: Nginx, Inc.

10 years agoThe MII layer shouldn't care about administrative status of an
glebius [Sat, 26 Oct 2013 18:40:17 +0000 (18:40 +0000)]
The MII layer shouldn't care about administrative status of an
interface. Make MII drivers forget about 'struct ifnet'.

Later plan is to provide an administrative downcall from ifnet
layer into drivers, to inform them about administrative status
change. If someone thinks that processing MII events for an
administratively down interface is a big problem, then drivers
would turn MII processing off.

The following MII drivers do evil things, like strcmp() on
driver name, so they still need knowledge of ifnet and thus
include if_var.h. They all need to be fixed:

sys/dev/mii/brgphy.c
sys/dev/mii/e1000phy.c
sys/dev/mii/ip1000phy.c
sys/dev/mii/jmphy.c
sys/dev/mii/nsphy.c
sys/dev/mii/rgephy.c
sys/dev/mii/truephy.c

Sponsored by: Netflix
Sponsored by: Nginx, Inc.

10 years agoBe a bit more flexible in how we find the console from the properties on
nwhitehorn [Sat, 26 Oct 2013 18:25:55 +0000 (18:25 +0000)]
Be a bit more flexible in how we find the console from the properties on
/chosen, following the list of allowed console properties in ePAPR. Also
do not require that stdin be defined and equal to stdout: stdin is
nonstandard (for ePAPR) and console in an unexpected place is after all
better than no console.

10 years agobump date forgotten in r257165
jmg [Sat, 26 Oct 2013 18:23:43 +0000 (18:23 +0000)]
bump date forgotten in r257165

10 years agoAdd some extra sanity checking and checks to printf format specifiers.
nwhitehorn [Sat, 26 Oct 2013 18:19:36 +0000 (18:19 +0000)]
Add some extra sanity checking and checks to printf format specifiers.

10 years agoProvide includes that are needed in these files, and before were read
glebius [Sat, 26 Oct 2013 18:18:50 +0000 (18:18 +0000)]
Provide includes that are needed in these files, and before were read
in implicitly via if.h -> if_var.h pollution.

Sponsored by: Netflix
Sponsored by: Nginx, Inc.

10 years agoInterrelated improvements to early boot mappings:
nwhitehorn [Sat, 26 Oct 2013 18:18:14 +0000 (18:18 +0000)]
Interrelated improvements to early boot mappings:
- Remove explicit requirement that the SOC registers be found except as an
  optimization (although the MPC85XX LAW drivers still require they be found
  externally, which should change).
- Remove magic CCSRBAR_VA value.
- Allow bus_machdep.c's early-boot code to handle non 1:1 mappings and
  systems not in real-mode or global 1:1 maps in early boot.
- Allow pmap_mapdev() on Book-E to reissue previous addresses if the
  area is already mapped. Additionally have it check all mappings, not
  just the CCSR area.

This allows the console on e500 systems to actually work on systems where
the boot loader was not kind enough to set up a 1:1 mapping before starting
the kernel.

10 years agoThe r48589 promised to remove implicit inclusion of if_var.h soon. Prepare
glebius [Sat, 26 Oct 2013 17:58:36 +0000 (17:58 +0000)]
The r48589 promised to remove implicit inclusion of if_var.h soon. Prepare
to this event, adding if_var.h to files that do need it. Also, include
all includes that now are included due to implicit pollution via if_var.h

Sponsored by: Netflix
Sponsored by: Nginx, Inc.

10 years agoClean up missed header references.
nwhitehorn [Sat, 26 Oct 2013 17:54:31 +0000 (17:54 +0000)]
Clean up missed header references.

10 years agoRemove unsigned < 0 comparison.
glebius [Sat, 26 Oct 2013 17:43:18 +0000 (17:43 +0000)]
Remove unsigned < 0 comparison.

10 years agoMove includes from if_bcereg.h to .c files.
glebius [Sat, 26 Oct 2013 17:40:38 +0000 (17:40 +0000)]
Move includes from if_bcereg.h to .c files.

10 years agoEnable SATA interface on Armada XP
zbb [Sat, 26 Oct 2013 17:29:50 +0000 (17:29 +0000)]
Enable SATA interface on Armada XP

- Add appropriate entry to DTS
- Allow for MV78460 SATA probe and configuration

Tested by: kevlo
Approved by: cognet (mentor)

10 years agoEnable UART busy detection handling for Armada XP - based board
zbb [Sat, 26 Oct 2013 17:27:32 +0000 (17:27 +0000)]
Enable UART busy detection handling for Armada XP - based board

All Armada XP chips should be affected. It is necessary to handle
busy interrupt/indication by enabling busy-detect property in DTS.

Tested by: kevlo
Approved by: cognet (mentor)

10 years agoWait for DesignWare UART transfers completion before accessing line control
zbb [Sat, 26 Oct 2013 17:24:59 +0000 (17:24 +0000)]
Wait for DesignWare UART transfers completion before accessing line control

When using DW UART with BUSY detection it is necessary to wait
until all serial transfers are finished before manipulating the
line control. LCR will not be affected when UART is busy.
In addition, if Divisor Latch Access Bit is being set in order to
modify UART divisors:
1. We will get BUSY interrupt if interrupts are enabled.
2. Because LCR will not be affected the THR and (even worse) IER
   contents will be corrupted. This will lead to console hang.

Approved by: cognet (mentor)

10 years agoFix concurrency issues with TLB1 updates and make pmap_kextract() search
nwhitehorn [Sat, 26 Oct 2013 16:49:41 +0000 (16:49 +0000)]
Fix concurrency issues with TLB1 updates and make pmap_kextract() search
TLB1 mappings as well, which is required for the console to work after
r257111.

10 years agoFix indentation
bdrewery [Sat, 26 Oct 2013 16:19:14 +0000 (16:19 +0000)]
Fix indentation

Reported by: zont
Approved by: bapt (implicit)
MFC after: 2 days
X-MFC-With: r257145

10 years agoSwitch to using ofw_bus_search_compatible() table-driven compat lookup.
ian [Sat, 26 Oct 2013 15:15:31 +0000 (15:15 +0000)]
Switch to using ofw_bus_search_compatible() table-driven compat lookup.
Add compat strings for Freescale Vybrid family SoCs.

10 years agoDocument that -a will output the device name when -u is not specified..
jmg [Sat, 26 Oct 2013 15:05:27 +0000 (15:05 +0000)]
Document that -a will output the device name when -u is not specified..
when -u is specified it is not...

update the docs to say that you can use full device names w/ -u, and
update the examples...

Submitted by: #vbsdcon
MFC after: 3 days

10 years agoAdd missing /etc/pkg to BSD.root.dist
bdrewery [Sat, 26 Oct 2013 15:02:34 +0000 (15:02 +0000)]
Add missing /etc/pkg to BSD.root.dist

Approved by: bapt
MFC after: 2 days
X-MFC-With: r257145

10 years agoThe old trap.h (then trap_aim.h) actually had trap ID codes for Book-E CPUs.
nwhitehorn [Sat, 26 Oct 2013 14:54:43 +0000 (14:54 +0000)]
The old trap.h (then trap_aim.h) actually had trap ID codes for Book-E CPUs.
Use it universally. Book-E traps may also need revisiting due to the
introduction of fixed-offset traps and the deprecation of IVORs in POWER
ISA 2.06, but that's very much an issue for another day.

10 years agoAdd pmap_mapdev_attr() and pmap_kenter_attr() interfaces. pmap_set_memattr()
nwhitehorn [Sat, 26 Oct 2013 14:52:55 +0000 (14:52 +0000)]
Add pmap_mapdev_attr() and pmap_kenter_attr() interfaces. pmap_set_memattr()
is slightly more complicated and is left unimplemented for now. Also
prevent pmap_mapdev() from mapping over the kernel and KVA regions if
devices happen to have high physical addresses.

MFC after: 2 weeks

10 years agoQueisce warnings for gperf -Wlogical-op-parentheses with parens to
sbruno [Sat, 26 Oct 2013 14:49:19 +0000 (14:49 +0000)]
Queisce warnings for gperf -Wlogical-op-parentheses with parens to
explicitly define the logic

10 years agoDisable fingerprint checking for now as the pkg repository mirrors will
bdrewery [Sat, 26 Oct 2013 14:19:57 +0000 (14:19 +0000)]
Disable fingerprint checking for now as the pkg repository mirrors will
not receive the signature until later this week.

Approved by: bapt

10 years agoLink in libcrypto as well to fix build in some cases.
bdrewery [Sat, 26 Oct 2013 13:38:49 +0000 (13:38 +0000)]
Link in libcrypto as well to fix build in some cases.

Approved by: bapt
MFC after: 2 days
Reported by: many

10 years agomachine/pmap.h is included by vm/pmap.h, so is redundant here. Thanks to
nwhitehorn [Sat, 26 Oct 2013 13:18:39 +0000 (13:18 +0000)]
machine/pmap.h is included by vm/pmap.h, so is redundant here. Thanks to
Alan Cox for pointing this out.

10 years agoMake hastctl list command output current queue sizes.
trociny [Sat, 26 Oct 2013 08:38:21 +0000 (08:38 +0000)]
Make hastctl list command output current queue sizes.

Reviewed by: pjd
MFC after: 1 month

10 years agoMerging local and remote bitmaps must be protected by hr_amp lock.
trociny [Sat, 26 Oct 2013 08:35:54 +0000 (08:35 +0000)]
Merging local and remote bitmaps must be protected by hr_amp lock.

This is believed to fix hastd crashes, which might occur during
synchronization, triggered by the failed assertion:

 Assertion failed: (amp->am_memtab[ext] > 0),
 function activemap_write_complete, file activemap.c, line 351.

MFC after: 1 week

10 years agoDo some cleanup of the SDT code. In particular,
markj [Sat, 26 Oct 2013 06:23:51 +0000 (06:23 +0000)]
Do some cleanup of the SDT code. In particular,

* Remove the unused sdt cdev.
* Don't bother keeping a list of probes in struct sdt_prov; it's not needed.
* Invoke sdt_load and sdt_unload from the module handler instead of
  registering separate SYSINITs.
* Keep to within 80 columns.
* Check for errors from dtrace_unregister().

10 years agoDocument /var/cache/pkg into hier(7) which pkg(8) uses.
bdrewery [Sat, 26 Oct 2013 03:55:29 +0000 (03:55 +0000)]
Document /var/cache/pkg into hier(7) which pkg(8) uses.

Approved by: bapt
MFC after: 2 days

10 years agoAdd infrastructure for installing pkg(8) keys into /etc/keys/pkg and add
bdrewery [Sat, 26 Oct 2013 03:53:24 +0000 (03:53 +0000)]
Add infrastructure for installing pkg(8) keys into /etc/keys/pkg and add
the current test key that packages will be signed with until 10.0-RELEASE.

Approved by: bapt
Discussed by: bapt with des
MFC after: 2 days

10 years agoAdd support to check the signature of a local pkg.txz file being
bdrewery [Sat, 26 Oct 2013 03:47:49 +0000 (03:47 +0000)]
Add support to check the signature of a local pkg.txz file being
added with "pkg add". If the pkg.conf is configured to check for
signature, then the pkg.txz.sig file will be expected and validated
per r257147

Approved by: bapt
MFC after: 2 days

10 years agoTell which fingerprint pkg is being validated against.
bdrewery [Sat, 26 Oct 2013 03:44:08 +0000 (03:44 +0000)]
Tell which fingerprint pkg is being validated against.

Approved by: bapt
MFC after: 2 days

10 years agoSupport checking signature for pkg bootstrap.
bdrewery [Sat, 26 Oct 2013 03:43:02 +0000 (03:43 +0000)]
Support checking signature for pkg bootstrap.

If the pkg.conf is configured with SIGNATURE_TYPE: FINGERPRINTS,
and FINGERPRINTS: /etc/keys/pkg then a pkg.sig file is fetched along
with pkg.txz. The signature contains the signature provided by the
signing server, and the public key. The .sig is the exact output
from the signing server in the following format:

  SIGNATURE
  <openssl signed>
  CERT
  <rsa public key>
  END

The signature is verified with the following logic:

 - If the .sig file is missing, it fails.
 - If the .sig doesn't validate, it fails.
 - If the public key in the .sig is not in the known trusted fingerprints,
   it fails.
 - If the public key is in the revoked key list, it fails.

Approved by: bapt
MFC after: 2 days
Discussed by: bapt with des, jonathan, gavin

10 years agoBe verbose and tell where pkg(8) is being bootstrapped from.
bdrewery [Sat, 26 Oct 2013 03:32:06 +0000 (03:32 +0000)]
Be verbose and tell where pkg(8) is being bootstrapped from.

Approved by: bapt
MFC after: 2 days

10 years agoAdd support for reading configuration files from /etc/pkg.
bdrewery [Sat, 26 Oct 2013 03:31:05 +0000 (03:31 +0000)]
Add support for reading configuration files from /etc/pkg.
For now only /etc/pkg/FreeBSD.conf is supported. Its style is:

Repo: {
   URL: "...",
   MIRROR_TYPE: "...",
   ...
}

The configuration will be read from /usr/local/etc/pkg.conf if exists,
otherwise /etc/pkg/FreeBSD.conf

Approved by: bapt
MFC after:  2 days

10 years agoFix build after r257111 by including headers with definition of pmap_kextract().
nwhitehorn [Sat, 26 Oct 2013 03:22:57 +0000 (03:22 +0000)]
Fix build after r257111 by including headers with definition of pmap_kextract().

10 years agoFix a couple of bugs in the fasttrap emulation of a "push %rbp" instruction:
markj [Sat, 26 Oct 2013 03:21:54 +0000 (03:21 +0000)]
Fix a couple of bugs in the fasttrap emulation of a "push %rbp" instruction:
the code was trying to save the stack pointer rather than the frame pointer,
and the arguments to copyout(9) were reversed, so nothing ended up being
saved on the stack. This would cause process crashes when the pid provider
was being used to instrument calls of a function starting with this
instruction.

Reported by: symbolics@gmx.com
Tested by: symbolics@gmx.com (earlier version)
MFC after: 2 weeks

10 years agoWrap long lines
bdrewery [Sat, 26 Oct 2013 03:21:08 +0000 (03:21 +0000)]
Wrap long lines

Approved by: bapt
MFC after: 2 days

10 years agoadd 0x8b, lifted from Linux iwlegacy/commands.h
adrian [Sat, 26 Oct 2013 01:17:54 +0000 (01:17 +0000)]
add 0x8b, lifted from Linux iwlegacy/commands.h

This is "STA invalid". I saw it during some 4965 testing (kern/183260)
and I still have no idea what is causing it.

Obtained from: Linux drivers/net/wireless/iwlegacy

10 years agoRegerate after r257138 swapped the default to WITH_NMTREE.
brooks [Fri, 25 Oct 2013 22:47:54 +0000 (22:47 +0000)]
Regerate after r257138 swapped the default to WITH_NMTREE.

MFC after: 3 days
Sponsored by: DARPA/AFRL