]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoWhen building FDT on MIPS, use softfloat.
Robert Watson [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.
Robert Watson [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
Robert Watson [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
Baptiste Daroussin [Sun, 23 Feb 2014 22:04:03 +0000 (22:04 +0000)]
Update my copyright

10 years agoSwitch pkg(7) from libyaml to libucl
Baptiste Daroussin [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
Baptiste Daroussin [Sun, 23 Feb 2014 21:50:11 +0000 (21:50 +0000)]
Branch libucl to the build

10 years agoImport libucl into head
Baptiste Daroussin [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 Chadd [Sun, 23 Feb 2014 21:43:15 +0000 (21:43 +0000)]
Fix indentation.

10 years agoImport libucl into vendor
Baptiste Daroussin [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.
David Chisnall [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 Lepore [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 Panchasara [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 Lepore [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 Lepore [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 Lepore [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().
Craig Rodrigues [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 Lepore [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.
Pedro F. Giffuni [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 Lepore [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.
Eitan Adler [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.
Eitan Adler [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.
Gleb Smirnoff [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 Lepore [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
Alan Cox [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 Lepore [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
Baptiste Daroussin [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
Baptiste Daroussin [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.
David Xu [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
Christian 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
Ivan Voras [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.
Peter 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
Mark Johnston [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
Mark Johnston [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.
Bryan Drewery [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 Lepore [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 Lepore [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
Mark Johnston [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 Wemm [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 agoVendor import serf-1.3.4
Peter Wemm [Sat, 22 Feb 2014 01:09:12 +0000 (01:09 +0000)]
Vendor import serf-1.3.4

10 years agoFix virtio spec URL.
Peter 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
Dimitry Andric [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
Mateusz Guzik [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
Baptiste Daroussin [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):
Dimitry Andric [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
Baptiste Daroussin [Fri, 21 Feb 2014 16:14:40 +0000 (16:14 +0000)]
Fix build on i386

10 years agoLower warning level when built with gcc
Baptiste Daroussin [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.
Christian 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
Baptiste Daroussin [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
Ivan Voras [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
Baptiste Daroussin [Fri, 21 Feb 2014 11:06:22 +0000 (11:06 +0000)]
Enforce mail user and group

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

10 years agoAdd dma-mbox-create forgotten in the previous commit
Baptiste Daroussin [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
Baptiste Daroussin [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
Baptiste Daroussin [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 Natu [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 Lepore [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.
Warner Losh [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,
David Xu [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.
Tycho Nightingale [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
Christian 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
Baptiste Daroussin [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 Wemm [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.
Michael 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 Wemm [Thu, 20 Feb 2014 20:09:28 +0000 (20:09 +0000)]
Match our implementation of iconv's inbuf argument.

10 years agoImport svn-1.8.8.
Peter Wemm [Thu, 20 Feb 2014 19:48:47 +0000 (19:48 +0000)]
Import svn-1.8.8.

Highlights:
* Security fix for apache server plugin that we don't build or use
* sqlite performance improvements.
* bug fixes for edge cases and some other less common operations.

10 years agoVendor import svn-1.8.8
Peter Wemm [Thu, 20 Feb 2014 19:26:10 +0000 (19:26 +0000)]
Vendor import svn-1.8.8

10 years agoMake it clear that there are two ways to add a session using iscsictl(8),
Edward Tomasz Napierala [Thu, 20 Feb 2014 17:23:08 +0000 (17:23 +0000)]
Make it clear that there are two ways to add a session using iscsictl(8),
and some options require configuration file.

Reviewed by: emaste
Sponsored by: The FreeBSD Foundation

10 years agoSpelling, grammar and mdoc cleanup.
Christian Brueffer [Thu, 20 Feb 2014 16:35:48 +0000 (16:35 +0000)]
Spelling, grammar and mdoc cleanup.

10 years agoDocument r261504 - FreeBSD/i386 guests can be run under bhyve.
Steven Kreuzer [Thu, 20 Feb 2014 14:39:12 +0000 (14:39 +0000)]
Document r261504 - FreeBSD/i386 guests can be run under bhyve.
Document r261498 - ping uses the Capsicum framework to drop privileges
Document r261344 - mdocml have been upgraded to version 1.12.3
Documetn r261991 - llvm/clang have been upgraded to version 3.4

Approved by: hrs (mentor)

10 years agoAdd early printf support, wrapped in #if 0 because it's only rarely needed.
Ian Lepore [Thu, 20 Feb 2014 14:29:59 +0000 (14:29 +0000)]
Add early printf support, wrapped in #if 0 because it's only rarely needed.

10 years agoFix a cross-reference.
Christian Brueffer [Thu, 20 Feb 2014 13:33:18 +0000 (13:33 +0000)]
Fix a cross-reference.

MFC after: 3 days

10 years agoFix the boot on FDT-enabled systems after r261819.
Luiz Otavio O Souza [Thu, 20 Feb 2014 13:09:08 +0000 (13:09 +0000)]
Fix the boot on FDT-enabled systems after r261819.

While here, don't overwrite the error message on interactive use and add
the missing '\n' at end of error message for the non interactive use.

Tested by: ian, myself
Approved by: adrian (mentor, implicit)

10 years agocompile with NOINET
Luigi Rizzo [Thu, 20 Feb 2014 04:56:55 +0000 (04:56 +0000)]
compile with NOINET

10 years agoSimplify APIC mode switching from MMIO to x2APIC. In part this is done to
Neel Natu [Thu, 20 Feb 2014 01:48:25 +0000 (01:48 +0000)]
Simplify APIC mode switching from MMIO to x2APIC. In part this is done to
simplify the implementation of the x2APIC virtualization assist in VT-x.

Prior to this change the vlapic allowed the guest to change its mode from
xAPIC to x2APIC. We don't allow that any more and the vlapic mode is locked
when the virtual machine is created. This is not very constraining because
operating systems already have to deal with BIOS setting up the APIC in
x2APIC mode at boot.

Fix a bug in the CPUID emulation where the x2APIC capability was leaking
from the host to the guest.

Ignore MMIO reads and writes to the vlapic in x2APIC mode. Similarly, ignore
MSR accesses to the vlapic when it is in xAPIC mode.

The default configuration of the vlapic is xAPIC. The "-x" option to bhyve(8)
can be used to change the mode to x2APIC instead.

Discussed with: grehan@

10 years agoTemporarily unhook BERI boot loader from the build until 32-bit MIPS
Robert Watson [Wed, 19 Feb 2014 23:09:25 +0000 (23:09 +0000)]
Temporarily unhook BERI boot loader from the build until 32-bit MIPS
properly excludes building our 64-bit only boot-loader adaptation.

10 years agoSpelling, grammar and mdoc cleanup.
Christian Brueffer [Wed, 19 Feb 2014 21:31:04 +0000 (21:31 +0000)]
Spelling, grammar and mdoc cleanup.

MFC after: 1 week

10 years agoDo build boot-loader FDT code on MIPS.
Robert Watson [Wed, 19 Feb 2014 17:44:59 +0000 (17:44 +0000)]
Do build boot-loader FDT code on MIPS.

MFC after: 3 weeks
Sponsored by: DARPA, AFRL

10 years agoRevert r262196
Martin Matuska [Wed, 19 Feb 2014 17:06:04 +0000 (17:06 +0000)]
Revert r262196

I am going to split this into two individual patches and test it with
the projects/pf branch that may get merged later.

10 years agoAdd missing Save Cursor support for VT520
Bryan Drewery [Wed, 19 Feb 2014 13:06:50 +0000 (13:06 +0000)]
Add missing Save Cursor support for VT520

Submitted by: IWAMOTO Kouichi <sue@iwmt.org>
PR: conf/174937
Obtained from: http://web.mit.edu/dosathena/doc/www/ek-vt520-rm.pdf
Approved by: bapt (mentor)
MFC after: 2 weeks

10 years agoUpdate MIPS bootinfo.h to reflect the actual MIPS boot2/loader boot-time
Robert Watson [Wed, 19 Feb 2014 09:19:09 +0000 (09:19 +0000)]
Update MIPS bootinfo.h to reflect the actual MIPS boot2/loader boot-time
interface.

MFC after: 3 weeks
Sponsored by: DARPA, AFRL

10 years agoV_irtualize rtsock refcounting, which reduces the chances for panics
Marko Zec [Wed, 19 Feb 2014 08:29:07 +0000 (08:29 +0000)]
V_irtualize rtsock refcounting, which reduces the chances for panics
on teardown of vnets without active routing sockets while at least
one routing socket is active elsewhere.

Tested by: Vijay Singh
MFC after: 3 days

10 years agoReally (I think) fix the sporadic heimdal build failures with high -j
Peter Wemm [Wed, 19 Feb 2014 07:09:14 +0000 (07:09 +0000)]
Really (I think) fix the sporadic heimdal build failures with high -j
levels. The root of the problem was that make was attempting to run up
to three concurrent asn1_compile commands to produce the three outputs
that it was declared to produce.  The failure was caused when the
asn1_compiles were started out of sync and a later one was truncating
the files that another thread was trying to copy.  In reality it is
supposed to be run exactly once and all three outputs are produced in
one pass.

Use the same hack as for the parent's Makefile.inc for the compile_et
multi-output rule.

10 years agoExtract out the port VLAN flags/setup code and throw it into two new
Adrian Chadd [Wed, 19 Feb 2014 06:43:52 +0000 (06:43 +0000)]
Extract out the port VLAN flags/setup code and throw it into two new
HAL methods.

This allows the AR8327 code to override it as appropriate.

Tested:

* DB120 - AR8327 and AR9340 on-board switch; only running 'etherswitchcfg'
  to check configs.  The actual VLAN programming wasn't tested.

10 years agoAdd methods for the VLAN port set/get routines.
Adrian Chadd [Wed, 19 Feb 2014 06:35:17 +0000 (06:35 +0000)]
Add methods for the VLAN port set/get routines.

The registers (and perhaps the flags) are different for the AR8327, so
I'll stub those out until they're written.

Tested:

* DB120 - both on-chip AR9340 and AR8327 switches.

10 years agoTurn the port init function into a HAL method and initialise it to the
Adrian Chadd [Wed, 19 Feb 2014 06:03:58 +0000 (06:03 +0000)]
Turn the port init function into a HAL method and initialise it to the
default port init code.

This needs to be overridden for the AR8327.

10 years agoTeach the PHY register path about the different MDIO bus address
Adrian Chadd [Wed, 19 Feb 2014 06:02:47 +0000 (06:02 +0000)]
Teach the PHY register path about the different MDIO bus address
for the AR8327.

Tested:

* AR8327, DB120

10 years agoAdd a new method to set up the individual port in question.
Adrian Chadd [Wed, 19 Feb 2014 06:01:40 +0000 (06:01 +0000)]
Add a new method to set up the individual port in question.

The AR8327 requires some different setup code.

10 years agoChange arswitch_ports_init() to arswitch_port_init(), and teach it to take
Adrian Chadd [Wed, 19 Feb 2014 05:35:41 +0000 (05:35 +0000)]
Change arswitch_ports_init() to arswitch_port_init(), and teach it to take
a single port to setup.

This may end up later being used as part of some logic to program
the PHY for a single port, rather than having to reinitialise them
all at once.

Tested:

* DB120

10 years agoAdd in the AR8327 probe/attach code and switch type.
Adrian Chadd [Wed, 19 Feb 2014 05:09:47 +0000 (05:09 +0000)]
Add in the AR8327 probe/attach code and switch type.

It detects fine, but (as expected) it won't attach just yet, let alone
pass traffic.

Tested:

* DB120, AR8327 switch

10 years agoStore away the chip version and revision; some AR8327 code depends upon
Adrian Chadd [Wed, 19 Feb 2014 04:30:53 +0000 (04:30 +0000)]
Store away the chip version and revision; some AR8327 code depends upon
the chip revision.

10 years agoAdd in a flag to control whether the low or high data word of a register access
Adrian Chadd [Wed, 19 Feb 2014 04:23:01 +0000 (04:23 +0000)]
Add in a flag to control whether the low or high data word of a register access
is latched in first.

The AR8327 apparently requires the low data word be latched in first.

Obtained from: Linux OpenWRT

10 years agoReplace Apache-style license on two Makefiles with stock 2-clause BSD;
Robert Watson [Tue, 18 Feb 2014 23:22:54 +0000 (23:22 +0000)]
Replace Apache-style license on two Makefiles with stock 2-clause BSD;
license, although the former is pretty safe, it wasn't intended to be
used in the version of MIPS boot2/loader upstreamed to FreeBSD.

MFC after: 3 weeks
Sponsored by: DARPA, AFRL

10 years agoCommit a first cut at ports of boot2 and loader to 64-bit MIPS, with a
Robert Watson [Tue, 18 Feb 2014 23:18:32 +0000 (23:18 +0000)]
Commit a first cut at ports of boot2 and loader to 64-bit MIPS, with a
particular interest in (and support for) SRI International and the
University of Cambridge's BERI FPGA soft-core processor.  This includes
micro device drivers for the Altera JTAG UART console, memory-mapped
flash, and the Altera SD Card IP core in both boot2 and loader.  boot2
can be written to the on-board Intel StrataFlash on the DE4 board, and
loader can be placed in StrataFlash or the SD Card.

Plenty of XXX comments, but works quite well locally in practice and I
am using it daily.  Although I had originally ported the ARM version
of boot2, the current version is x86-derived as that proved more
feature-complete.  As we don't currently use partitions on our flash
disks, support for that has been commented out relative to x86, but
would be easy to add back.  FDT support has not yet been hooked up,
although some skeleton parts have been put in place for that.

This may well be a useful starting point for ports to other 32-bit and
64-bit MIPS-ISA systems.

This merge is synchronised to CheriBSD github commit
e41d74fd719525d4dd7a7ee499114679165eeaf6, but with some additions of
$FreeBSD.

MFC after: 3 weeks
Sponsored by: DARPA, AFRAL

10 years agoDe-virtualize pf_mtag_z [1]
Martin Matuska [Tue, 18 Feb 2014 22:17:12 +0000 (22:17 +0000)]
De-virtualize pf_mtag_z [1]
Process V_pf_overloadqueue in vnet context [2]

This fixes two VIMAGE kernel panics and allows to simultaneously run host-pf
and vnet jails. pf inside jails remains broken.

PR: kern/182964
Submitted by: glebius@FreeBSD.org [2], myself [1]
Tested by: rodrigc@FreeBSD.org, myself
MFC after: 2 weeks

10 years agoRemove an unnecessary header.
Luiz Otavio O Souza [Tue, 18 Feb 2014 21:29:30 +0000 (21:29 +0000)]
Remove an unnecessary header.

Reported by: nwhitehorn
Approved by: adrian (mentor, implicit)

10 years agoFix mismerge in r262121
Ed Maste [Tue, 18 Feb 2014 19:46:45 +0000 (19:46 +0000)]
Fix mismerge in r262121

A break statement was lost in the merge.  The error had no functional
impact, but restore it to reduce the diff against upstream.

10 years agoAdd a check to validate that memory BARs of passthru devices are 4KB aligned.
Neel Natu [Tue, 18 Feb 2014 19:00:15 +0000 (19:00 +0000)]
Add a check to validate that memory BARs of passthru devices are 4KB aligned.

Also, the MSI-x table offset is not required to be 4KB aligned so take this
into account when computing the pages occupied by the MSI-x tables.

10 years agoAdd more __BEGIN_DECLS / __END_DECLS to <sys/capability.h>.
Jonathan Anderson [Tue, 18 Feb 2014 14:54:56 +0000 (14:54 +0000)]
Add more __BEGIN_DECLS / __END_DECLS to <sys/capability.h>.

capability.h currently only wraps some of its declarations in __BEGIN_DECLS/__END_DECLS, so cap_enter(), cap_sandboxed(), etc. are usable from C++ code but cap_rights_init(), cap_rights_is_valid() etc. are not. This commit fixes this distinction.

Approved by: rwatson (mentor)
MFC after: 1 week
Sponsored by: DARPA, AFRL

10 years agoFix incorrect assertions.
Gleb Smirnoff [Tue, 18 Feb 2014 14:21:26 +0000 (14:21 +0000)]
Fix incorrect assertions.

10 years agoenable rfc1323 and rfc1644 by default in picobsd images.
Luigi Rizzo [Tue, 18 Feb 2014 04:38:26 +0000 (04:38 +0000)]
enable rfc1323 and rfc1644 by default in picobsd images.
I disabled it some 15 years ago but it is useful to have them on
when doing tcp throughput tests.