]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoAdd support for Quartz Module.
br [Mon, 24 Feb 2014 19:32:15 +0000 (19:32 +0000)]
Add support for Quartz Module.

Quartz is a tiny module utilized Freescale VF6xx
system-on-chip and development kit produced by
Device Solutions.

Quartz is available in a form of LGA (38x38x2mm)
or as a module with high-density connectors.

Sponsored by: Device Solutions

10 years agoUpdate ATP manual page.
hselasky [Mon, 24 Feb 2014 19:27:26 +0000 (19:27 +0000)]
Update ATP manual page.

Submitted by: Rohit Grover <rgrover1@gmail.com>
MFC after: 2 weeks

10 years agoFix compiler warning.
hselasky [Mon, 24 Feb 2014 19:19:35 +0000 (19:19 +0000)]
Fix compiler warning.

Reported by: David Wolfskill <david@catwhisker.org>
MFC after: 2 weeks

10 years agoBuild FICL support into little-endian 64-bit MIPS boot-loader fragments;
rwatson [Mon, 24 Feb 2014 18:44:22 +0000 (18:44 +0000)]
Build FICL support into little-endian 64-bit MIPS boot-loader fragments;
while this won't actually be used for anything (yet), it doesn't hurt to
ensure it is exposed to the tinderbox.

Requested by:   imp, jmallett
MFC after:      3 weeks

10 years agoBuild 64-bit ELF support into little-endian 64-bit MIPS boot-loader
rwatson [Mon, 24 Feb 2014 18:44:03 +0000 (18:44 +0000)]
Build 64-bit ELF support into little-endian 64-bit MIPS boot-loader
fragments; while this won't actually be used for anything (yet), it
doesn't hurt to ensure it is exposed to the tinderbox.

Requested by: imp, jmallett
MFC after: 3 weeks

10 years agohier(7): Add /usr/lib/private
eadler [Mon, 24 Feb 2014 17:14:08 +0000 (17:14 +0000)]
hier(7): Add /usr/lib/private

Requested by: theraven
MFC After: 3 days

10 years agoFix an array index out of bounds bug in iconv VIQR (Vietnamese) module.
tijl [Mon, 24 Feb 2014 14:40:28 +0000 (14:40 +0000)]
Fix an array index out of bounds bug in iconv VIQR (Vietnamese) module.

PR: 185964
Submitted by: Manuel Mausz <manuel-freebsd@mausz.at>
MFC after: 5 days

10 years agoFix Simplified Chinese character set conversions by switching around the
tijl [Mon, 24 Feb 2014 13:43:11 +0000 (13:43 +0000)]
Fix Simplified Chinese character set conversions by switching around the
fields of an internal struct so it corresponds with the way variables of
this type are initialised.

PR: 185964
Submitted by: Manuel Mausz <manuel-freebsd@mausz.at>
MFC after: 5 days

10 years agoConsistently pass around context information using a simple pointer. This
tijl [Mon, 24 Feb 2014 13:33:20 +0000 (13:33 +0000)]
Consistently pass around context information using a simple pointer.  This
fixes some dereferencing bugs in Chinese character set conversions.

PR: 185964
MFC after: 5 days

10 years agoEnable the second and the third I2C controllers on Beaglebone-black.
loos [Mon, 24 Feb 2014 12:45:03 +0000 (12:45 +0000)]
Enable the second and the third I2C controllers on Beaglebone-black.

The first I2C controller is only used to manage the on-board devices (PMIC
and HDMI framer) and its bus is not exposed on the expasion headers.

With this change the following pins on the P9 expansion headers are now
reserved as I2C pins:

 Pin 17 - I2C1 SCL
 Pin 18 - I2C1 SDA
 Pin 19 - I2C2 SCL
 Pin 20 - I2C2 SDA

The I2C2 is the bus that should be used to read the contents of cape
eeproms.

Approved by: adrian (mentor, implicit)

10 years agoUpdate ATP driver:
hselasky [Mon, 24 Feb 2014 10:44:42 +0000 (10:44 +0000)]
Update ATP driver:
- Add support for emulating a mouse wheel, Z-axis.

Submitted by: Rohit Grover <rgrover1@gmail.com>
MFC after: 2 weeks

10 years agoAdd in port0/port6 configuration as part of the platform data code path.
adrian [Mon, 24 Feb 2014 05:55:00 +0000 (05:55 +0000)]
Add in port0/port6 configuration as part of the platform data code path.

It's still hardcoded (for db120) but it is now hardcoded in all the
same place (ie, the pdata path.)  The port config/status code now checks
port0/port6 as appropriate to configure things.

Tested:

* Qualcomm Atheros DB120, AR8327 switch.

10 years agoAdd the AR8327 bits to the DB120 config file.
adrian [Mon, 24 Feb 2014 04:48:46 +0000 (04:48 +0000)]
Add the AR8327 bits to the DB120 config file.

There's plenty of hints that I haven't yet fleshed out and are hardcoded
in arswitch_8327.c.  They're listed here (from OpenWRT) for completeness.

This is enough to get the thing up, running and pinging.

Note that the mdiobus for the on-switch switch changes - the AR8327
probes first, which exposes mdio1, and thus the arge1 mdiobus will probe
and attach as mdio2.  That is what the AR9344 on-chip switch has to
attach to.

Tested:

* Qualcomm Atheros DB120

10 years agoLink the AR8327 to the build.
adrian [Mon, 24 Feb 2014 04:47:27 +0000 (04:47 +0000)]
Link the AR8327 to the build.

10 years agoAdd initial AR8327 support.
adrian [Mon, 24 Feb 2014 04:47:16 +0000 (04:47 +0000)]
Add initial AR8327 support.

This is (almost!) enough to actually probe, attach, configure a default
port group and do some basic work.  It's also totally hard-coded for
the Qualcomm Atheros DB120 board - it doesn't yet have any of the code
from OpenWRT which parses extra configuration data to know how to program
the switch.  The LED stuff is also missing.

But, it's enough to facilitate board, PHY, switch and VLAN bringup,
so I am committing it now.

Tested:

* Qualcomm Atheros DB120

Obtained from: OpenWRT

10 years agoMethodize the arswitch VLAN routines.
adrian [Mon, 24 Feb 2014 04:44:28 +0000 (04:44 +0000)]
Methodize the arswitch VLAN routines.

These differ per chipset family in subtle and evil ways.

It becomes very noticable on the AR8327 where the layout is just plain
wrong.

10 years ago* Ensure enough ports/phys are available for both the AR8327 and previous
adrian [Mon, 24 Feb 2014 04:43:23 +0000 (04:43 +0000)]
* Ensure enough ports/phys are available for both the AR8327 and previous
  switches.

* Add some new VLAN HAL methods that will be used by the VLAN configuration
  code.  The AR933x and later switches use slightly different register
  layouts (even though the driver currently doesn't support it.)

10 years agoAdd the bits needed to run SMP on imx6.
ian [Mon, 24 Feb 2014 03:51:31 +0000 (03:51 +0000)]
Add the bits needed to run SMP on imx6.

The 'option SMP' isn't added to the kernel config yet; people wanting to
test this have to opt-in for now.

10 years agoInvalidate caches immediately upon entry to init_secondary(). Also set
ian [Mon, 24 Feb 2014 03:47:39 +0000 (03:47 +0000)]
Invalidate caches immediately upon entry to init_secondary().  Also set
the Bufferable bit in the PDE entries of the secondary processor startup
pagetables.

The caches really need to be invalidated even earlier than this, but this
is a big step in the right direction.  The invalidate needs to happen
before the MMU is enabled, which means it has to be called from asm code
that's running with physical addressing.  Fixing that will be handled in
a future change.

10 years agoAdd correct attributions.
adrian [Mon, 24 Feb 2014 02:47:47 +0000 (02:47 +0000)]
Add correct attributions.

Sponsored by: Netflix, Inc.

10 years agoAdd a new option - 'a <file>' - which spits out annotated callgraphs.
adrian [Mon, 24 Feb 2014 02:43:58 +0000 (02:43 +0000)]
Add a new option - 'a <file>' - which spits out annotated callgraphs.

'-m <file>' spits out the given stream into <file> (eg, /dev/stdout).
However, it only resolves the first symbol; it doesn't parse the entire
callgraph.  If it fails to lookup then it doesn't print anything.

'-a' instead does a symbol and file:line lookup for each address in each
callgraph and will happily print the address itself with no lookup
information if it couldn't look things up.

This makes it much easier to pull out individual records from a
pmc data file and look at the callgraph information without having to
hand-decode the addresses.

Sponsored by: Netflix, Inc.

10 years agoAdd a very basic and totally hacked up iwnstats program.
adrian [Mon, 24 Feb 2014 02:38:43 +0000 (02:38 +0000)]
Add a very basic and totally hacked up iwnstats program.

This just extracts the current statistics out from the NIC via
the new ioctl API and displays them.  It runs every 100ms to hopefully
grab the latest statistics.

I may eventually teach this to use libstatfoo like what has been done
for athstats and such; but this is good enough for now for people to
do some basic investigation.

Tested:

* Intel Centrino 6205

10 years agoTrack and expose the latest statistics from the firmware.
adrian [Mon, 24 Feb 2014 02:37:04 +0000 (02:37 +0000)]
Track and expose the latest statistics from the firmware.

Tested:

* Intel Centrino 6205

10 years agoReserve a bit for statistics debugging. I'll hopefully use it soon.
adrian [Mon, 24 Feb 2014 02:13:20 +0000 (02:13 +0000)]
Reserve a bit for statistics debugging.  I'll hopefully use it soon.

10 years agoAdd a new cache maintenance function, idcache_inv_all, to the table, and
ian [Mon, 24 Feb 2014 01:41:58 +0000 (01:41 +0000)]
Add a new cache maintenance function, idcache_inv_all, to the table, and
implementations for each of the chips we support.  Most chips up through
armv6 can use the armv4 implementation which has a single coprocessor
opcode for this operation.  The rather more complex armv7 implementation
comes from netbsd.

10 years agoAdd an ident line.
ian [Mon, 24 Feb 2014 01:17:23 +0000 (01:17 +0000)]
Add an ident line.

10 years agoRemove a useless newline, warnx already appends a newline
bapt [Sun, 23 Feb 2014 23:49:10 +0000 (23:49 +0000)]
Remove a useless newline, warnx already appends a newline

10 years agoUpdate ATP driver:
hselasky [Sun, 23 Feb 2014 23:36:32 +0000 (23:36 +0000)]
Update ATP driver:
- Support for double-tap and drag.
- Support for 2-finger horizontal scrolling which translates to page-back/forward events.
- Single finger tap is equivalent to a left-button press.
- Two-finger taps are mapped to the right-button click.
- Three fingers are mapped to middle button.
- Add sysctl to disable single finger tapping.
- Fix for multiple open of /dev/atp0
- Enhanced support for the Fountain/Geyser family by adding Geyser4.
- Update manual page.

Submitted by: Rohit Grover <rgrover1@gmail.com>
MFC after: 2 weeks

10 years agoFix a typo.
adrian [Sun, 23 Feb 2014 23:13:53 +0000 (23:13 +0000)]
Fix a typo.

10 years agoActually set the proper bit to indicate TTB shared memory.
ian [Sun, 23 Feb 2014 23:06:50 +0000 (23:06 +0000)]
Actually set the proper bit to indicate TTB shared memory.

Submitted by: Juergan Weiss

10 years agoIf the L2 cache type is PIPT, pass a physical address for a flush.
ian [Sun, 23 Feb 2014 22:52:48 +0000 (22:52 +0000)]
If the L2 cache type is PIPT, pass a physical address for a flush.

While this is technically more correct, I don't think it much matters,
because the only thing in the tree that calls cpu_flush_dcache() is md(4)
and I'm > 99% sure it's bogus that it does so; md has no ability to do
anything that can perturb data cache coherency.

10 years agoLower the level of WARNS to fix build with gcc
bapt [Sun, 23 Feb 2014 22:50:22 +0000 (22:50 +0000)]
Lower the level of WARNS to fix build with gcc

10 years agoMove the declaration for mpentry() into a header file instead of pasting
ian [Sun, 23 Feb 2014 22:35:18 +0000 (22:35 +0000)]
Move the declaration for mpentry() into a header file instead of pasting
it into a bunch of different .c files.  Remove declarations for the unused
mptramp() function from everywhere except AramadaXP (and I think it's
really not used there either, because the code that references it appears
to be insanely does-nothing in nature).

10 years agoEliminate an unused-var warning by wrapping #if 0 around some tables of
ian [Sun, 23 Feb 2014 22:29:59 +0000 (22:29 +0000)]
Eliminate an unused-var warning by wrapping #if 0 around some tables of
values that were probably entered "for completeness" from a datasheet, and
for all I know may be useful/necessary some day.

10 years agoRemove libyaml, it has been replaced by libucl
bapt [Sun, 23 Feb 2014 22:27:14 +0000 (22:27 +0000)]
Remove libyaml, it has been replaced by libucl

10 years agoBuild the BERI boot loader on 64-bit MIPS (but not 32-bit MIPS). While
rwatson [Sun, 23 Feb 2014 22:20:52 +0000 (22:20 +0000)]
Build the BERI boot loader on 64-bit MIPS (but not 32-bit MIPS).  While
these binaries aren't immediately useful on other MIPSes, still build them
as part of mips64 world in order to expose them to tinderbox.

MFC after: 3 weeks
Sponsored by: DARPA, AFRL

10 years agoCapability rights are held by descriptors, not processes.
pjd [Sun, 23 Feb 2014 22:13:16 +0000 (22:13 +0000)]
Capability rights are held by descriptors, not processes.

Reported by: jonathan

10 years agoWhen building FDT on MIPS, use softfloat.
rwatson [Sun, 23 Feb 2014 22:12:25 +0000 (22:12 +0000)]
When building FDT on MIPS, use softfloat.

MFC after: 3 weeks
Sponsored by: DARPA, AFRL

10 years agoOn mips64, built 64-bit ELF support.
rwatson [Sun, 23 Feb 2014 22:11:26 +0000 (22:11 +0000)]
On mips64, built 64-bit ELF support.

MFC after: 3 weeks
Sponsored by: DARPA, AFRL

10 years agoGive mips64 its own ficl configuration that sizes pointers/etc suitably for
rwatson [Sun, 23 Feb 2014 22:10:25 +0000 (22:10 +0000)]
Give mips64 its own ficl configuration that sizes pointers/etc suitably for
a 64-bit architecture, rather than trying to share the 32-bit MIPS ficl
configuration.

When building ficl on MIPS, don't conflate 32-bit and 64-bit ISAs -- unlike
x86, we don't want a 32-bit loader on a 64-bit CPU.  Use quite conservative
code generation -- e.g., softfloat, no GOT, etc -- suitable for early boot.

MFC after: 3 weeks
Sponsored by: DARPA, AFRL

10 years agoUpdate my copyright
bapt [Sun, 23 Feb 2014 22:04:03 +0000 (22:04 +0000)]
Update my copyright

10 years agoSwitch pkg(7) from libyaml to libucl
bapt [Sun, 23 Feb 2014 21:55:07 +0000 (21:55 +0000)]
Switch pkg(7) from libyaml to libucl

10 years agoBranch libucl to the build
bapt [Sun, 23 Feb 2014 21:50:11 +0000 (21:50 +0000)]
Branch libucl to the build

10 years agoImport libucl into head
bapt [Sun, 23 Feb 2014 21:49:21 +0000 (21:49 +0000)]
Import libucl into head

UCL is heavily infused by nginx configuration as the example of a convenient
configuration system. However, UCL is fully compatible with JSON format and is
able to parse json files.

UCL is used by pkg(8) for its configuration file as well for the manifest format
in packages, it will be used in base for the pkg boostrap (signature checking
and configuration file parsing.)

libucl has been developped and is maintained by vsevolod@

10 years agoFix indentation.
adrian [Sun, 23 Feb 2014 21:43:15 +0000 (21:43 +0000)]
Fix indentation.

10 years agoImport libucl into vendor
bapt [Sun, 23 Feb 2014 21:28:28 +0000 (21:28 +0000)]
Import libucl into vendor

UCL is heavily infused by nginx configuration as the example of a convenient
configuration system. However, UCL is fully compatible with JSON format and is
able to parse json files.

UCL is used by pkg(8) for its configuration file as well for the manifest format
in packages, it will be used in base for the pkg boostrap (signature checking
and configuration file parsing.)

libucl has been developped and is maintained by vsevolod@

10 years agoFix parsing multiple roots with whitespace between them.
theraven [Sun, 23 Feb 2014 21:13:07 +0000 (21:13 +0000)]
Fix parsing multiple roots with whitespace between them.

Patch by:   Patrick Wildt

10 years agoFix a typo _IMX51_TZICRREG_H_ -> _IMX51_TZICREG_H_ (extra R)
ian [Sun, 23 Feb 2014 21:13:04 +0000 (21:13 +0000)]
Fix a typo _IMX51_TZICRREG_H_ -> _IMX51_TZICREG_H_ (extra R)

10 years agoPicoStation M2HP presents reg domain 0x2a which is not found in atheros or linux
hiren [Sun, 23 Feb 2014 18:07:17 +0000 (18:07 +0000)]
PicoStation M2HP presents reg domain 0x2a which is not found in atheros or linux
reference code. Add this workaround for now.

Reviewed by: adrian

10 years agoDon't force bootverbose on anymore, it can be set from ubldr now.
ian [Sun, 23 Feb 2014 01:49:01 +0000 (01:49 +0000)]
Don't force bootverbose on anymore, it can be set from ubldr now.

10 years agoCreate a generic IMX6 kernel config. This is based on the existing
ian [Sun, 23 Feb 2014 01:48:07 +0000 (01:48 +0000)]
Create a generic IMX6 kernel config.  This is based on the existing
WANDBOARD.common config, but with the freescale-specific optons and devices
all together at the bottom now.  In addition to reformatting and shuffling
lines around, two new options are added because they're now known to work,
VFP and FREEBSD_BOOT_LOADER.

This config does not include any static DTB, it requires that u-boot
provide a DTB (or a custom kernel config can compile one in).

This will supercede all the existing WANDBOARD* configs, but those will
be left around for a while to help people transition their customized
configs to include this new one instead.

10 years agoAdd the FREEBSD_BOOT_LOADER option so that a loaded DTB passed in from
ian [Sun, 23 Feb 2014 01:37:29 +0000 (01:37 +0000)]
Add the FREEBSD_BOOT_LOADER option so that a loaded DTB passed in from
ubldr will actually get used.

10 years agoRemove KASSERT from in6p_lookup_mcast_ifp().
rodrigc [Sun, 23 Feb 2014 01:27:22 +0000 (01:27 +0000)]
Remove KASSERT from in6p_lookup_mcast_ifp().

When the devel/jenkins port, version 1.551 was started,
the kernel would panic if INVARIANTS was enabled in the kernel config.

Suggested by: bms

10 years agoAdd a feature for automatically finding and loading a dtb file by name.
ian [Sat, 22 Feb 2014 22:18:20 +0000 (22:18 +0000)]
Add a feature for automatically finding and loading a dtb file by name.
The name is taken from the u-boot env vars fdtfile or fdt_file.  If the
name isn't fully-qualified a search is done in module_path locations.

The search order for a usable dtb in fdt_setup_fdtp() is now

 - A dtb loaded with an explicit "load -t dtb" command.
 - A dtb already loaded into memory somehow[*] and pointed to by fdt_to_load.
 - A dtb in the memory pointed to by the u-boot env vars fdtaddr or fdt_addr.
 - A file named by the u-boot env vars fdtfile or fdt_file.
 - A static dtb compiled into the kernel.

* Presumably by some arch-specific command or code.

10 years agoext2fs: fully enable ext4 read-only support.
pfg [Sat, 22 Feb 2014 22:07:16 +0000 (22:07 +0000)]
ext2fs: fully enable ext4 read-only support.

The ext4 developers tend to tag Ext4-specific flags as
"incompatible" even when such features are not relevant for
read-only support.  This is a consequence of the process
though which this filesystem is implemented without design
and the fact that some new features are not extensible to
ext2/3.

Organize the features according to what we support and sort
them so that we can now read-only mount filesystems with
some features that may be found in newly formatted ext4 fs.

Submitted by: Zheng Liu
Reviewed by: pfg
MFC after: 5 days

10 years agoChange file_loadraw() from static to public. Change the order of its
ian [Sat, 22 Feb 2014 22:03:26 +0000 (22:03 +0000)]
Change file_loadraw() from static to public.  Change the order of its
arguments from type,filename to filename,type to be consistant with other
public file_whatever() functions, and change it to return a pointer to
the preloaded_file struct describing the file.  Adjust existing callers.

10 years agobsd-family-tree: Add DragonFly 3.6.1 to the tree.
eadler [Sat, 22 Feb 2014 21:35:40 +0000 (21:35 +0000)]
bsd-family-tree: Add DragonFly 3.6.1 to the tree.

10 years agobsd-family-tree: Add DragonFly 3.6.1 to the tree.
eadler [Sat, 22 Feb 2014 21:34:28 +0000 (21:34 +0000)]
bsd-family-tree: Add DragonFly 3.6.1 to the tree.

10 years agoImprove logging of send errors, reporting error code and interface.
glebius [Sat, 22 Feb 2014 19:20:40 +0000 (19:20 +0000)]
Improve logging of send errors, reporting error code and interface.
Reduce code duplication between INET and INET6.

Tested by: Lytochkin Boris <lytboris gmail.com>

10 years agoChange fdt_setup_fdtp() from "guess then fail" to more probe-like behavior.
ian [Sat, 22 Feb 2014 19:10:58 +0000 (19:10 +0000)]
Change fdt_setup_fdtp() from "guess then fail" to more probe-like behavior.

The old code basically said it was going to use some particular blob
without knowing whether it could successfully do so, then it would invoke
the function to do that and return its status.  If it failed, you were
done, even if other blobs might be available.  Now the code attempts to use
some particular blob and if that succeeds it says so and returns success,
otherwise it moves on to try another potential blob.

One specific problem this solves is when u-boot sets an fdtaddr variable
to point to some memory address, then doesn't actually load a blob at
that address.  Now the header check will fail, and the code will move
on to the fallback dtb compiled into the kernel (if any).

10 years agoWhen the kernel is running in a virtual machine, it cannot rely upon the
alc [Sat, 22 Feb 2014 18:53:42 +0000 (18:53 +0000)]
When the kernel is running in a virtual machine, it cannot rely upon the
processor family to determine if the workaround for AMD Family 10h Erratum
383 should be enabled.  To enable virtual machine migration among a
heterogeneous collection of physical machines, the hypervisor may have
been configured to report an older processor family with a reduced feature
set.  Effectively, the reported processor family and its features are like
a "least common denominator" for the collection of machines.

Therefore, when the kernel is running in a virtual machine, instead of
relying upon the processor family, we now test for features that prove
that the underlying processor is not affected by the erratum.  (The
features that we test for are unlikely to ever be emulated in software
on an affected physical processor.)

PR: 186061
Tested by: Simon Matter
Discussed with: jhb, neel
MFC after: 2 weeks

10 years agoAllow the ubldr boot device to be choosen by a u-boot environment variable.
ian [Sat, 22 Feb 2014 17:51:10 +0000 (17:51 +0000)]
Allow the ubldr boot device to be choosen by a u-boot environment variable.

If a "loaderdev=<device>" env variable is set and the named device
exists, it is used.  If the device doesn't exist, fall back to the
historic "probe" loop that prefers disk devices over network devices.

If the env var is not set, preserve the historic behavior of using the
first working disk device provided by u-boot, or a network device if no
functional disk device is found and a network device exists.

The old probe loop is reworked so that it checks all bootable devices
provided by u-boot rather than taking an early-out on the first device
found.  This results in the cosmetic change of listing all potential boot
devices for the user, but the behavior of which device it chooses is the
same as it has always been.

10 years agoRegen after WITHOUT_DMA -> WITHOUT_DMAGENT renaming
bapt [Sat, 22 Feb 2014 13:07:38 +0000 (13:07 +0000)]
Regen after WITHOUT_DMA -> WITHOUT_DMAGENT renaming

10 years agoRename WITHOUT_DMA into WITHOUT_DMAGENT to avoid confusion
bapt [Sat, 22 Feb 2014 13:05:23 +0000 (13:05 +0000)]
Rename WITHOUT_DMA into WITHOUT_DMAGENT to avoid confusion

Requested by: ian

10 years agoIncrease alignment to size of pointer if the alignment is too small.
davidxu [Sat, 22 Feb 2014 11:06:48 +0000 (11:06 +0000)]
Increase alignment to size of pointer if the alignment is too small.
Some modules do not align data at least to size of pointer, they uses a
smaller alignment, but our pointer should be aligned to its native
boundary, otherwise on some platforms, hardware alignment checking
will cause bus error.

10 years agoSimplify the way the end of a singly linked list is followed (for adding
brueffer [Sat, 22 Feb 2014 10:15:27 +0000 (10:15 +0000)]
Simplify the way the end of a singly linked list is followed (for adding
items), so it is more obvious that we aren't going to indirect through
a NULL pointer.

PR: 144723
Submitted by: Garrett Cooper <yaneurabeya at gmail.com>
Obtained from: NetBSD r1.19
MFC after: 2 weeks

10 years agoGrammar fix
ivoras [Sat, 22 Feb 2014 09:53:17 +0000 (09:53 +0000)]
Grammar fix

Submitted by: Warren Block wblock AT wonkity.com

10 years agoZFS boot support for bhyveload.
grehan [Sat, 22 Feb 2014 07:18:06 +0000 (07:18 +0000)]
ZFS boot support for bhyveload.

Modelled after the i386 zfsloader. However, with no
2nd stage zfsboot to search for a bootable dataset,
attempt a ZFS boot if there is more than one ZFS
dataset found during the disk probe.

sys/boot/userboot/zfs
 - build the ZFS boot library

sys/boot/userboot/userboot/
 conf.c
  - Add the ZFS pool and filesystem tables
 devicename.c
  - correctly format ZFS devices
 main.c
  - increase the size of the libstand malloc pool
  to account for the increased usage from ZFS buffers
  - probe for a ZFS dataset, and if one is
  found, attempt to boot from it.

usr.sbin/bhyveload/bhyveload.c
 - allow multiple invocations of the '-d' option
 to specify multiple disks e.g. a raidz set.
 Up to 32 disks are supported.

Tested with various combinations of GPT, MBR, single
and multiple disks, RAID-Z, mirrors.

Reviewed by: neel
Discussed with: avg
Tested by: Michael Dexter and others
MFC after: 3 weeks

10 years ago1452 DTrace buffer autoscaling should be less violent
markj [Sat, 22 Feb 2014 05:18:55 +0000 (05:18 +0000)]
1452 DTrace buffer autoscaling should be less violent

illumos/illumos-gate@6fb4854bed54ce82bd8610896b64ddebcd4af706

This fixes the tst.resize1.d and tst.resize2.d DTrace tests, which have
been failing since r261122 since they were causing dtrace(1) to attempt to
allocate and use large amounts of memory, and get killed by the OOM killer
as a result.

MFC after: 1 month

10 years agoDefine the KM_NORMALPRI flag for kmem_alloc(), as it is used in some
markj [Sat, 22 Feb 2014 05:13:35 +0000 (05:13 +0000)]
Define the KM_NORMALPRI flag for kmem_alloc(), as it is used in some
upstream DTrace code. It indicates that the kernel memory allocator need not
attempt to satisfy non-blocking allocations in low-memory conditions. This
has no direct equivalent in the malloc(9) flags, so it is just defined to 0
for now.

10 years agoFix style of comment blocks.
bdrewery [Sat, 22 Feb 2014 04:28:49 +0000 (04:28 +0000)]
Fix style of comment blocks.

Reported by: peter
Approved by: bapt (mentor, implicit)
X-MFC with: r262006

10 years agoLook for both fdtaddr and fdt_addr env var names. Grepping the u-boot
ian [Sat, 22 Feb 2014 03:36:45 +0000 (03:36 +0000)]
Look for both fdtaddr and fdt_addr env var names.  Grepping the u-boot
source shows that board vendors seem to be about evenly split on this.

This commit is a trivial change to note that while the previous change
was supposed to be whitespace only, this functional change also crept in.
The added lines were:

  /* Board vendors use both fdtaddr and fdt_addr names.  Grrrr. */

  if (s == NULL)
s = ub_env_get("fdt_addr");

10 years agoFix the strange 2-space indentation that appears only in this one function.
ian [Sat, 22 Feb 2014 03:29:53 +0000 (03:29 +0000)]
Fix the strange 2-space indentation that appears only in this one function.

10 years agoPrint a backtrace if the SDT(9) stub gets called so that there's at least
markj [Sat, 22 Feb 2014 01:41:45 +0000 (01:41 +0000)]
Print a backtrace if the SDT(9) stub gets called so that there's at least
some hope of figuring out how it happened.

Suggested by: rstone
MFC after: 1 week

10 years agoUpdate serf-1.3.0 -> 1.3.4 - fixes multiple issues (see the CHANGES file)
peter [Sat, 22 Feb 2014 01:19:47 +0000 (01:19 +0000)]
Update serf-1.3.0 -> 1.3.4 - fixes multiple issues (see the CHANGES file)
including an SSL issue that turned up in the cluster with svn-1.8.8.

10 years agoFix virtio spec URL.
grehan [Fri, 21 Feb 2014 22:45:35 +0000 (22:45 +0000)]
Fix virtio spec URL.

Submitted by: lwhsu
MFC after: 1 week

10 years agoMove the part in bsd.own.mk that sets -Wno-c++11-extensions for clang to
dim [Fri, 21 Feb 2014 22:38:25 +0000 (22:38 +0000)]
Move the part in bsd.own.mk that sets -Wno-c++11-extensions for clang to
bsd.sys.mk, where it really belongs.  This also causes the flag to get
added when clang is *not* the default system compiler, but is still
used, e.g. by setting WITH_CLANG_IS_CC manually.

MFC after: 3 days

10 years agoFix a race between kern_proc_{o,}filedesc_out and fdescfree leading
mjg [Fri, 21 Feb 2014 22:29:09 +0000 (22:29 +0000)]
Fix a race between kern_proc_{o,}filedesc_out and fdescfree leading
to use-after-free.

fdescfree proceeds to free file pointers once fd_refcnt reaches 0, but
kern_proc_{o,}filedesc_out only checked for hold count.

MFC after: 3 days

10 years agoInstall a default configuration file for dma
bapt [Fri, 21 Feb 2014 21:02:19 +0000 (21:02 +0000)]
Install a default configuration file for dma

Suggested by: flo

10 years agoPull in r197521 from upstream clang trunk (by rdivacky):
dim [Fri, 21 Feb 2014 20:55:34 +0000 (20:55 +0000)]
Pull in r197521 from upstream clang trunk (by rdivacky):

  Use the integrated assembler by default on FreeBSD/ppc and ppc64.

Requested by: jhibbits
MFC after: 1 month
X-MFC-With: r261991

10 years agoFix build on i386
bapt [Fri, 21 Feb 2014 16:14:40 +0000 (16:14 +0000)]
Fix build on i386

10 years agoLower warning level when built with gcc
bapt [Fri, 21 Feb 2014 14:14:48 +0000 (14:14 +0000)]
Lower warning level when built with gcc

10 years agoMatch the correct variable to the variable description.
brueffer [Fri, 21 Feb 2014 13:53:41 +0000 (13:53 +0000)]
Match the correct variable to the variable description.

PR: 121173
Submitted by: Thomas Mueller <tmueller at sysgo.com>
MFC after: 1 week

10 years agoFix build with gcc
bapt [Fri, 21 Feb 2014 13:17:10 +0000 (13:17 +0000)]
Fix build with gcc

10 years agoExplain how and where kern.cam.ada.write_cache can be set in practical
ivoras [Fri, 21 Feb 2014 12:17:27 +0000 (12:17 +0000)]
Explain how and where kern.cam.ada.write_cache can be set in practical
situations.

Reviewed by: hrs
Approved by: mav

10 years agoEnforce mail user and group
bapt [Fri, 21 Feb 2014 11:06:22 +0000 (11:06 +0000)]
Enforce mail user and group

10 years agoFix typo
bapt [Fri, 21 Feb 2014 10:34:59 +0000 (10:34 +0000)]
Fix typo

10 years agoAdd dma-mbox-create forgotten in the previous commit
bapt [Fri, 21 Feb 2014 09:42:50 +0000 (09:42 +0000)]
Add dma-mbox-create forgotten in the previous commit

10 years agoRegen after addition of WITHOUT_DMA
bapt [Fri, 21 Feb 2014 07:31:24 +0000 (07:31 +0000)]
Regen after addition of WITHOUT_DMA

10 years agoImport Dragonfly Mail Agent into base system
bapt [Fri, 21 Feb 2014 07:26:49 +0000 (07:26 +0000)]
Import Dragonfly Mail Agent into base system

It is a small and lightweight Mail Transport Agent.
It accepts mails from locally installed Mail User Agents (MUA) and delivers the
mails either locally or to a remote destination. Remote delivery includes
several features like TLS/SSL support, SMTP authentication and NULLCLIENT.

Make dma conditional to new WITHOUT_DMA option and make it respect WITHOUT_MAIL

Reviewed by: peter
Discussed with: emaste, bz, peter

10 years agoAdd support for x2APIC virtualization assist in Intel VT-x.
neel [Fri, 21 Feb 2014 06:03:54 +0000 (06:03 +0000)]
Add support for x2APIC virtualization assist in Intel VT-x.

The vlapic.ops handler 'enable_x2apic_mode' is called when the vlapic mode
is switched to x2APIC. The VT-x implementation of this handler turns off the
APIC-access virtualization and enables the x2APIC virtualization in the VMCS.

The x2APIC virtualization is done by allowing guest read access to a subset
of MSRs in the x2APIC range. In non-root operation the processor will satisfy
an 'rdmsr' access to these MSRs by reading from the virtual APIC page instead.

The guest is also given write access to TPR, EOI and SELF_IPI MSRs which
get special treatment in non-root operation. This is documented in the
Intel SDM section titled "Virtualizing MSR-Based APIC Accesses".

Enforce that APIC-write and APIC-access VM-exits are handled only if
APIC-access virtualization is enabled. The one exception to this is
SELF_IPI virtualization which may result in an APIC-write VM-exit.

10 years agoAdd basic cpu frequency control and temperature monitoring to imx6_anatop.
ian [Fri, 21 Feb 2014 06:00:06 +0000 (06:00 +0000)]
Add basic cpu frequency control and temperature monitoring to imx6_anatop.

The temperature monitor device is enabled to sample the die temperature at
16hz.  The temperature is published via sysctl.  A callout routine at 10hz
monitors the temperature and throttles back the cpu if the temperature
goes over a user-settable throttle point (by default 10C less than the
critical high-point temperature for the chip).  The hardware is supposed
to be able to deliver an interrupt when the temperature exceeds a settable
limit, but the interrupt never arrives so for now a callout does the job.

At attach time we read the maximum cpu frequency the chip is allowed to run
at and the cpu is set to run at that speed.  It's reported at attach time.
A sysctl variable reports the current speed when queried.

New sysctl values:

  dev.imx6_anatop.0.cpu_mhz: 984
  dev.imx6_anatop.0.temperature: 37.9C
  dev.imx6_anatop.0.throttle_temperature: 95.0C

Steven Lawrance did the initial heavy lifting on this, but I changed
enough stuff that I'm the one to blame if anything breaks.

Submitted by: Steven Lawrance <stl@koffein.net>

10 years agoRemove bogus blank line.
imp [Fri, 21 Feb 2014 05:17:30 +0000 (05:17 +0000)]
Remove bogus blank line.

10 years agomalloc_aligned() may not leave enough space for pointer to allocated memory,
davidxu [Fri, 21 Feb 2014 03:36:16 +0000 (03:36 +0000)]
malloc_aligned() may not leave enough space for pointer to allocated memory,
saving the pointer will overwrite bytes belongs to another memory block
unexpectly, to fix the problem, use (allocated address + sizeof(void *)) as
initial value, and slip to next aligned address, so maximum extra bytes is
sizeof(void *) + align - 1.

Tested by: Andre Albsmeier < mail at ma17 dot ata dot myota dot orgndre >

10 years agoAvoid clobbering the counter mode when issuing a latch command.
tychon [Fri, 21 Feb 2014 01:15:26 +0000 (01:15 +0000)]
Avoid clobbering the counter mode when issuing a latch command.

Approved by: grehan (co-mentor)

10 years agoFurther refine the auth fail regex to catch more auth failures and
brueffer [Thu, 20 Feb 2014 23:43:49 +0000 (23:43 +0000)]
Further refine the auth fail regex to catch more auth failures and
reduce false positives.

The committed patch was provided by Christian Marg.

PR: 91732
Submitted by: Daniel O'Connor <doconnor at gsoft.com.au>
Skye Poier <spoier at gmail.com>
Alan Amesbury <amesbury at umn.edu>
Christian Marg <marg at rz.tu-clausthal.de>
MFC after: 1 month

10 years agoImport dma 89702b7f14 (2013-02-13) into vendors
bapt [Thu, 20 Feb 2014 22:39:55 +0000 (22:39 +0000)]
Import dma 89702b7f14 (2013-02-13) into vendors

10 years agoRevert my commit in r261253; the real problem was tackled in r262209.
peter [Thu, 20 Feb 2014 20:53:29 +0000 (20:53 +0000)]
Revert my commit in r261253; the real problem was tackled in r262209.

10 years agoRemove redundant code and fix a style error.
tuexen [Thu, 20 Feb 2014 20:14:43 +0000 (20:14 +0000)]
Remove redundant code and fix a style error.

MFC after: 3 days

10 years agoMatch our implementation of iconv's inbuf argument.
peter [Thu, 20 Feb 2014 20:09:28 +0000 (20:09 +0000)]
Match our implementation of iconv's inbuf argument.