]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agoTweak assert to also print the thread address.
Konstantin Belousov [Sun, 10 May 2015 09:05:57 +0000 (09:05 +0000)]
Tweak assert to also print the thread address.

Sponsored by: The FreeBSD Foundation
MFC after: 3 weeks

9 years agoSome style(9) fixes
Baptiste Daroussin [Sun, 10 May 2015 09:02:15 +0000 (09:02 +0000)]
Some style(9) fixes

9 years agoOn exec, single-threading must be enforced before arguments space is
Konstantin Belousov [Sun, 10 May 2015 09:00:40 +0000 (09:00 +0000)]
On exec, single-threading must be enforced before arguments space is
allocated from exec_map.  If many threads try to perform execve(2) in
parallel, the exec map is exhausted and some threads sleep
uninterruptible waiting for the map space.  Then, the thread which won
the race for the space allocation, cannot single-thread the process,
causing deadlock.

Reported and tested by: pho (previous version)
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

9 years agoClean up the style to use "options<space><tab>".
Andrew Turner [Sun, 10 May 2015 08:48:00 +0000 (08:48 +0000)]
Clean up the style to use "options<space><tab>".

9 years agoSatisfy vm_object uma zone destructor requirements after r282660 when
Konstantin Belousov [Sun, 10 May 2015 08:21:03 +0000 (08:21 +0000)]
Satisfy vm_object uma zone destructor requirements after r282660 when
vnode object creation raced.

Reported by: pho
Reviewed by: alc
Sponsored by: The FreeBSD Foundation

9 years agoTurn ieee80211_start_scan_locked() into a swscan module private method.
Adrian Chadd [Sun, 10 May 2015 06:59:34 +0000 (06:59 +0000)]
Turn ieee80211_start_scan_locked() into a swscan module private method.

It turns out that ieee80211_start_scan_locked() is only ever called by
the swscan code and it won't likely be required by firmware scanning
implementations.

So, don't bother keeping it in ieee80211_scan.c and it likely won't
become an API call.

Tested:

* Intel 5100, STA mode
* AR5416, STA mode

9 years agoAttempt to address Bug #176201 - don't advertise what the AP announced
Adrian Chadd [Sun, 10 May 2015 06:57:53 +0000 (06:57 +0000)]
Attempt to address Bug #176201 - don't advertise what the AP announced
to us. Instead, advertise what we can do based on what the AP says and what
we're capped at by the VAP settings.

For non-STA modes we still advertise what our VAP settings are.

It may be that I've over-complicated this and instead of capping things
we can just always announce what we're capable of.  But this should at least
stop the blatantly wrong handling of A-MPDU parameters.

(I'll happily simplify things if someone can dig up a replacement, better
compliant behaviour.)

PR: kern/176201

9 years agoFix a couple bugs in 64-bit powerpc fasttrap argument retrieval.
Justin Hibbits [Sun, 10 May 2015 04:33:01 +0000 (04:33 +0000)]
Fix a couple bugs in 64-bit powerpc fasttrap argument retrieval.

Found by code inspection.

9 years agoRemove unnecessary code and make use of generic implementations for
Luiz Otavio O Souza [Sun, 10 May 2015 02:19:27 +0000 (02:19 +0000)]
Remove unnecessary code and make use of generic implementations for
bus_alloc_resource(), bus_release_resource() and bus_set_resource()
(bus_generic_rl_alloc_resource(), bus_generic_rl_release_resource() and
bus_generic_rl_set_resource() respectively).

Do not print the resources for nomatch devices.

Use the inherited method for bus_get_resource_list() on ofw_iicbus.c.

Submitted by: jhb and Michal Meloun (D2033)

9 years agoReplace sprintf(3) with snprintf(3)
Baptiste Daroussin [Sat, 9 May 2015 22:48:48 +0000 (22:48 +0000)]
Replace sprintf(3) with snprintf(3)

9 years agoUse snprintf(3) instead of sprintf(3)
Baptiste Daroussin [Sat, 9 May 2015 22:43:44 +0000 (22:43 +0000)]
Use snprintf(3) instead of sprintf(3)
Remove useless "else"

9 years agoRemove now unused LNBUFSZ buffer size
Baptiste Daroussin [Sat, 9 May 2015 22:08:30 +0000 (22:08 +0000)]
Remove now unused LNBUFSZ buffer size

9 years agoReturn from the function as early as possible
Baptiste Daroussin [Sat, 9 May 2015 21:53:33 +0000 (21:53 +0000)]
Return from the function as early as possible

This reduces the depth of the if statements and improves clarity of the code

9 years agoCorrect the assertion. We should compare the pmap' curcpu pcid value
Konstantin Belousov [Sat, 9 May 2015 21:36:44 +0000 (21:36 +0000)]
Correct the assertion.  We should compare the pmap' curcpu pcid value
against 0, not the pmap.

Noted by: Oliver Pinter <oliver.pinter@hardenedbsd.org>
Sponsored by: The FreeBSD Foundation
MFC after: 3 weeks

9 years agoPass over the at91 kernels to reduce the diff between them.
Andrew Turner [Sat, 9 May 2015 21:24:55 +0000 (21:24 +0000)]
Pass over the at91 kernels to reduce the diff between them.

9 years agoMerge ^/projects/release-arm-redux into ^/head.
Glen Barber [Sat, 9 May 2015 21:08:12 +0000 (21:08 +0000)]
Merge ^/projects/release-arm-redux into ^/head.

Of note:

- This commit adds native FreeBSD/arm release build support without
  requiring out-of-tree utilities.

- Part of this merge removes the WANDBOARD-{SOLO,DUAL,QUAD} kernel
  configuration files, for which the IMX6 kernel configuration file
  should be used instead.

- The resulting images have a 'freebsd' user (password 'freebsd'),
  to allow ssh(1) access when console access is not available (VGA
  or serial).  The default 'root' user password is set to 'root'.

- The /etc/ttys file for arm images now enable both ttyv0 and ttyu0
  by default.

Help from: many (boot testing, feedback, etc.)
Sponsored by: The FreeBSD Foundation

9 years agoThe vmem callback to reclaim kmem arena address space on low or
Konstantin Belousov [Sat, 9 May 2015 20:08:36 +0000 (20:08 +0000)]
The vmem callback to reclaim kmem arena address space on low or
fragmented conditions currently just wakes up the pagedaemon.  The
kmem arena is significantly smaller then the total available physical
memory, which means that there are loads where kmem arena space could
be exhausted, while there is a lot of pages available still.  The
woken up pagedaemon sees vm_pages_needed != 0, verifies the condition
vm_paging_needed() which is false, clears the pass and returns back to
sleep, not calling neither uma_reclaim() nor lowmem handler.

To handle low kmem arena conditions, create additional pagedaemon
thread which calls uma_reclaim() directly.  The thread sleeps on the
dedicated channel and kmem_reclaim() wakes the thread in addition to
the pagedaemon.

Reported and tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

9 years agoRemove some uneeded headers
Baptiste Daroussin [Sat, 9 May 2015 19:29:55 +0000 (19:29 +0000)]
Remove some uneeded headers

9 years agoRemove unneeded headers
Baptiste Daroussin [Sat, 9 May 2015 19:22:33 +0000 (19:22 +0000)]
Remove unneeded headers

9 years agoReplace malloc(3) + strcpy(3) + strcat(3) by asprintf(3)
Baptiste Daroussin [Sat, 9 May 2015 19:12:16 +0000 (19:12 +0000)]
Replace malloc(3) + strcpy(3) + strcat(3) by asprintf(3)

9 years agoRewrite amd64 PCID implementation to follow an algorithm described in
Konstantin Belousov [Sat, 9 May 2015 19:11:01 +0000 (19:11 +0000)]
Rewrite amd64 PCID implementation to follow an algorithm described in
the Vahalia' "Unix Internals" section 15.12 "Other TLB Consistency
Algorithms".  The same algorithm is already utilized by the MIPS pmap
to handle ASIDs.

The PCID for the address space is now allocated per-cpu during context
switch to the thread using pmap, when no PCID on the cpu was ever
allocated, or the current PCID is invalidated.  If the PCID is reused,
bit 63 of %cr3 can be set to avoid TLB flush.

Each cpu has PCID' algorithm generation count, which is saved in the
pmap pcpu block when pcpu PCID is allocated.  On invalidation, the
pmap generation count is zeroed, which signals the context switch code
that already allocated PCID is no longer valid.  The implication is
the TLB shootdown for the given cpu/address space, due to the
allocation of new PCID.

The pm_save mask is no longer has to be tracked, which (significantly)
reduces the targets of the TLB shootdown IPIs.  Previously, pm_save
was reset only on pmap_invalidate_all(), which made it accumulate the
cpuids of all processors on which the thread was scheduled between
full TLB shootdowns.

Besides reducing the amount of TLB shootdowns and removing atomics to
update pm_saves in the context switch code, the algorithm is much
simpler than the maintanence of pm_save and selection of the right
address space in the shootdown IPI handler.

Reviewed by: alc
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 3 weeks

9 years agoUse snprintf(3) instead of strcpy(3) + strncat(3)
Baptiste Daroussin [Sat, 9 May 2015 19:09:34 +0000 (19:09 +0000)]
Use snprintf(3) instead of strcpy(3) + strncat(3)

9 years agoUse sbuf(9) instead of homebrewed buffered string
Baptiste Daroussin [Sat, 9 May 2015 19:00:16 +0000 (19:00 +0000)]
Use sbuf(9) instead of homebrewed buffered string

9 years agoRemove unused define.
Konstantin Belousov [Sat, 9 May 2015 18:38:35 +0000 (18:38 +0000)]
Remove unused define.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

9 years agoDo not return from thread_single(SINGLE_BOUNDARY) until all stopped
Konstantin Belousov [Sat, 9 May 2015 18:32:13 +0000 (18:32 +0000)]
Do not return from thread_single(SINGLE_BOUNDARY) until all stopped
thread are guarenteed to be removed from the processors.

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

9 years agoIf x86 CPU implementation of the MWAIT instruction reasonably
Konstantin Belousov [Sat, 9 May 2015 12:28:48 +0000 (12:28 +0000)]
If x86 CPU implementation of the MWAIT instruction reasonably
interacts with interrupts, query ACPI and use MWAIT for entrance into
Cx sleep states.  Support C1 "I/O then halt" mode.  See Intel'
document 302223-007 "Intelб╝ Processor Vendor-Specific ACPI Interface
Specification" for description.

Move the acpi_cpu_c1() function into x86/cpu_machdep.c and use
it instead of inlining "sti; hlt" sequence in several places.

In the acpi(4) man page, besides documenting the dev.cpu.N.cx_methods
sysctl, correct the names for dev.cpu.N.{cx_usage,cx_lowest,cx_supported}
sysctls.

Both jkim and avg have some other patches implementing the mwait
functionality; this work is unrelated.  Linux does not rely on the
ACPI to provide correct tables describing Cx modes.  Instead, the
driver has pre-defined knowledge of the CPU models, it was supplied by
Intel.

Tested by:    pho (previous versions)
Sponsored by: The FreeBSD Foundation

9 years agoConvert remaining hwpmc(4) debug printfs over to KTR to unbreak the build
Bjoern A. Zeeb [Sat, 9 May 2015 09:21:59 +0000 (09:21 +0000)]
Convert remaining hwpmc(4) debug printfs over to KTR to unbreak the build
for at least powerpc kernels.   Missed in r282658.

MFC after: 10 days

9 years agoPass the resources requests to the upper bus.
Luiz Otavio O Souza [Sat, 9 May 2015 03:39:18 +0000 (03:39 +0000)]
Pass the resources requests to the upper bus.

Submitted by: Michal Meloun <meloun@miracle.cz>

9 years agoHandle IRQ resources on iicbus and ofw_iicbus.
Luiz Otavio O Souza [Sat, 9 May 2015 03:05:44 +0000 (03:05 +0000)]
Handle IRQ resources on iicbus and ofw_iicbus.

Based on a patch submitted by Michal Meloun <meloun@miracle.cz>.

9 years agoFix the double space in comment.
Stanislav Sedov [Sat, 9 May 2015 00:48:44 +0000 (00:48 +0000)]
Fix the double space in comment.

While here, change the comment style to match the rest of the file.

9 years agoAlways convert uuid to lower case.
Xin LI [Fri, 8 May 2015 23:36:31 +0000 (23:36 +0000)]
Always convert uuid to lower case.

MFC after: 2 weeks

9 years agoFix about ten integer overflows and underflows and a handful of logic
Baptiste Daroussin [Fri, 8 May 2015 22:11:54 +0000 (22:11 +0000)]
Fix about ten integer overflows and underflows and a handful of logic
errors in line number handling.

Submitted by: ingo at OpenBSD
Discussed with: ingo at OpenBSD
Obtained from: OpenBSD

9 years agoReplace spaces with tabs, removes an extra blank line.
Luiz Otavio O Souza [Fri, 8 May 2015 21:51:37 +0000 (21:51 +0000)]
Replace spaces with tabs, removes an extra blank line.

No functional changes.

9 years agoMove the text section to the start of the output file, so that when you
Ian Lepore [Fri, 8 May 2015 19:43:53 +0000 (19:43 +0000)]
Move the text section to the start of the output file, so that when you
create a stripped .bin file from it the entry point is the first byte of
the file.  (Will allow "load $addr $file ; go $addr" in u-boot.)

9 years agoPlace VM objects on the object list when created and never remove them.
John Baldwin [Fri, 8 May 2015 19:43:37 +0000 (19:43 +0000)]
Place VM objects on the object list when created and never remove them.
This is ok since objects come from a NOFREE zone and allows objects to
be locked while traversing the object list without triggering a LOR.

Ensure that objects on the list are marked DEAD while free or stillborn,
and that they have a refcount of zero.  This required updating most of
the pagers to explicitly mark an object as dead when deallocating it.
(Only the vnode pager did this previously.)

Differential Revision: https://reviews.freebsd.org/D2423
Reviewed by: alc, kib (earlier version)
MFC after: 2 weeks
Sponsored by: Norse Corp, Inc.

9 years agoConvert hwpmc(4) debug printfs over to KTR.
John Baldwin [Fri, 8 May 2015 19:40:00 +0000 (19:40 +0000)]
Convert hwpmc(4) debug printfs over to KTR.

Differential Revision: https://reviews.freebsd.org/D2487
Reviewed by: davide, emaste
MFC after: 2 weeks
Sponsored by: Norse Corp, Inc.

9 years agoUse the IMX6 kernel configuration for the WANDBOARD build,
Glen Barber [Fri, 8 May 2015 18:55:09 +0000 (18:55 +0000)]
Use the IMX6 kernel configuration for the WANDBOARD build,
since it supports all of these board variants.

While here, remove the WANDBOARD-{QUAD,SOLO,DUAL} kernel
configuration files.

Discussed with: ian
Sponsored by: The FreeBSD Foundation

9 years agoPort x86 busdma to ARM64
Zbigniew Bodek [Fri, 8 May 2015 18:47:19 +0000 (18:47 +0000)]
Port x86 busdma to ARM64

The x86 busdma subsystem allows using multiple implementations.
By default the classic bounce buffer approach is used, however
on systems with IOMMU it could be in runtime switched to more
efficient hardware accelerated implementation.

This commit adds ARM64 port of the x86 busdma framework and bounce
buffer backend. It is ready to use on IO coherent systems. If the
IO coherency cannot be guaranteed, the cache management operations have
to be added to this code in places marked by /* XXX ARM64TODO (...) */
comments. Also IOMMU support might be added by registering another
busdma implementation like it is already done on the x86.

Reviewed by:   andrew, emaste
Obtained from: Semihalf
Sponsored by:  The FreeBSD Foundation

9 years agoStrip the KERNEL from the mount paths, working around the following
Glen Barber [Fri, 8 May 2015 18:45:32 +0000 (18:45 +0000)]
Strip the KERNEL from the mount paths, working around the following
error:

 root@releng2:/ # mount_msdosfs /dev/md5s1 /usr/obj/usr/src/release/WANDBOARD-QUAD/fat
 mount_msdosfs: /dev/md5s1: File name too long

Sponsored by: The FreeBSD Foundation

9 years agoFix path to the u-boot.imx file, which is relative to the root of
Glen Barber [Fri, 8 May 2015 17:53:44 +0000 (17:53 +0000)]
Fix path to the u-boot.imx file, which is relative to the root of
the chroot environment.

Sponsored by: The FreeBSD Foundation

9 years agoEnsure the USB audio driver doesn't attach twice on the same USB
Hans Petter Selasky [Fri, 8 May 2015 17:48:48 +0000 (17:48 +0000)]
Ensure the USB audio driver doesn't attach twice on the same USB
device by grabbing all the USB audio device interfaces.

MFC after: 1 week

9 years agoAdd support for more than 8 audio channels per PCM stream for USB
Hans Petter Selasky [Fri, 8 May 2015 17:07:11 +0000 (17:07 +0000)]
Add support for more than 8 audio channels per PCM stream for USB
audio class compliant devices under FreeBSD. Tested using 16 recording
and 16 playback audio channels simultaneously.

MFC after: 2 weeks

9 years agoExtend the maximum number of allowed PCM channels in a PCM stream to
Hans Petter Selasky [Fri, 8 May 2015 17:00:33 +0000 (17:00 +0000)]
Extend the maximum number of allowed PCM channels in a PCM stream to
127 and decrease the maximum number of sub-channels to 1. These
definitions are only used inside the kernel and can be changed later
if more than one sub-channel is desired. This has been done to allow
so-called USB audio rack modules to work with FreeBSD.

Bump the FreeBSD version to force recompiling all external modules.

MFC after: 2 weeks
Reviewed by: mav

9 years agoFix spelling of INTERNALLIBS
Bryan Drewery [Fri, 8 May 2015 16:43:01 +0000 (16:43 +0000)]
Fix spelling of INTERNALLIBS

9 years agoTouch '/firstboot' so the growfs rc(8) script runs.
Glen Barber [Fri, 8 May 2015 16:41:21 +0000 (16:41 +0000)]
Touch '/firstboot' so the growfs rc(8) script runs.

Sponsored by: The FreeBSD Foundation

9 years agoFix the starting block of the partition.
Glen Barber [Fri, 8 May 2015 16:37:57 +0000 (16:37 +0000)]
Fix the starting block of the partition.

Sponsored by: The FreeBSD Foundation

9 years agoThe "SYSCTL_INT()" default value is only used for read only SYSCTLs
Hans Petter Selasky [Fri, 8 May 2015 16:37:40 +0000 (16:37 +0000)]
The "SYSCTL_INT()" default value is only used for read only SYSCTLs
and is not applicable unless the integer pointer is NULL. Set it to
zero to avoid confusion. While at it remove extra semicolon at the end
of the "VT_SYSCTL_INT()" macro.

MFC after: 1 week

9 years agoPrevent switching to NULL or own window in the "vt_proc_window_switch"
Hans Petter Selasky [Fri, 8 May 2015 16:19:01 +0000 (16:19 +0000)]
Prevent switching to NULL or own window in the "vt_proc_window_switch"
function. This fixes an issue where X11 keyboard input can appear
stuck. The cause of the problem is a duplicate TTY device window
switch IOCTL during boot, which leaves the "vt_switch_timer" running,
because the current window is already selected. While at it factor out
some NULL checks.

PR: 200032
Differential Revision: https://reviews.freebsd.org/D2480
Reported by: several people
MFC after: 1 week
Reviewed by: emaste

9 years agoUse the kern.bootfile sysctl to set the default kernel path rather than
John Baldwin [Fri, 8 May 2015 16:02:31 +0000 (16:02 +0000)]
Use the kern.bootfile sysctl to set the default kernel path rather than
hardcoding /boot/kernel. This allows pmcstat(8) to work without -k when
using nextboot -k or 'boot foo' at the loader to boot alternate kernels.

Differential Revision: https://reviews.freebsd.org/D2425
Reviewed by: adrian, emaste, gnn
MFC after: 2 weeks
Sponsored by: Norse Corp, Inc.

9 years agoInitial support for building the PANDABOARD image.
Glen Barber [Fri, 8 May 2015 16:00:06 +0000 (16:00 +0000)]
Initial support for building the PANDABOARD image.

Sponsored by: The FreeBSD Foundation

9 years agoMove hwpmc(4) debugging code under a new HWPMC_DEBUG option instead of
John Baldwin [Fri, 8 May 2015 15:57:23 +0000 (15:57 +0000)]
Move hwpmc(4) debugging code under a new HWPMC_DEBUG option instead of
the broader DEBUG option.

Reviewed by: emaste
MFC after: 2 weeks
Sponsored by: Norse Corp, Inc.

9 years agoAdd a file missed in the previous commit.
Glen Barber [Fri, 8 May 2015 15:23:21 +0000 (15:23 +0000)]
Add a file missed in the previous commit.

Sponsored by: The FreeBSD Foundation

9 years agoCopy arm/WANDBOARD-QUAD.conf to arm/WANDBOARD-{SOLO,DUAL}.conf.
Glen Barber [Fri, 8 May 2015 15:22:29 +0000 (15:22 +0000)]
Copy arm/WANDBOARD-QUAD.conf to arm/WANDBOARD-{SOLO,DUAL}.conf.
Ian informed me a few months ago that the WANDBOARD-* kernels will
eventually be combined into one that will work across all these
boards, but for now, build them individually.

Sponsored by: The FreeBSD Foundation

9 years agoFix FAT partition size.
Glen Barber [Fri, 8 May 2015 15:18:31 +0000 (15:18 +0000)]
Fix FAT partition size.

Sponsored by: The FreeBSD Foundation

9 years agoSigh. Really fix CHECKSUM file creation.
Glen Barber [Fri, 8 May 2015 15:15:36 +0000 (15:15 +0000)]
Sigh.  Really fix CHECKSUM file creation.

Sponsored by: The FreeBSD Foundation

9 years agoFix CHECKSUM file creation.
Glen Barber [Fri, 8 May 2015 15:10:00 +0000 (15:10 +0000)]
Fix CHECKSUM file creation.

Sponsored by: The FreeBSD Foundation

9 years agoInitial support for building WANDBOARD-QUAD images.
Glen Barber [Fri, 8 May 2015 15:07:17 +0000 (15:07 +0000)]
Initial support for building WANDBOARD-QUAD images.

Several parts of this were obtained from Crochet.

Sponsored by: The FreeBSD Foundation

9 years agoxen: introduce a newbus function to allocate unused memory
Roger Pau Monné [Fri, 8 May 2015 14:48:40 +0000 (14:48 +0000)]
xen: introduce a newbus function to allocate unused memory

In order to map memory from other domains when running on Xen FreeBSD uses
unused physical memory regions. Until now this memory has been allocated
using bus_alloc_resource, but this is not completely safe as we can end up
using unreclaimed MMIO or ACPI regions.

Fix this by introducing a new newbus method that can be used by Xen drivers
to request for unused memory regions. On amd64 we make sure this memory
comes from regions above 4GB in order to prevent clashes with MMIO/ACPI
regions. On i386 there's nothing we can do, so just fall back to the
previous mechanism.

Sponsored by: Citrix Systems R&D
Tested by: Gustau Pérez <gperez@entel.upc.edu>

9 years agoEnable ttyv0 and ttyu0 by default if they are available
Glen Barber [Fri, 8 May 2015 14:13:19 +0000 (14:13 +0000)]
Enable ttyv0 and ttyu0 by default if they are available
consoles.

Tested on: RPI-B
Sponsored by: The FreeBSD Foundation

9 years agoMFV r282630: 5809 Blowaway full receive in v1 pool causes kernel panic
Andriy Gapon [Fri, 8 May 2015 14:03:14 +0000 (14:03 +0000)]
MFV r282630: 5809 Blowaway full receive in v1 pool causes kernel panic

MFC after: 5 days

9 years agoInitial commit to support building RPI2 images, based on information
Glen Barber [Fri, 8 May 2015 13:55:27 +0000 (13:55 +0000)]
Initial commit to support building RPI2 images, based on information
and documentation written by loos@ on the Wiki.

Sponsored by: The FreeBSD Foundation

9 years ago5809 Blowaway full receive in v1 pool causes kernel panic
Andriy Gapon [Fri, 8 May 2015 13:55:24 +0000 (13:55 +0000)]
5809 Blowaway full receive in v1 pool causes kernel panic

Author: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Alex Reece <alex@delphix.com>
Reviewed by: Will Andrews <will@freebsd.org>
Approved by: Gordon Ross <gwr@nexenta.com>

illumos/illumos-gate@f40b29ce2a815bcc0787acf6f520a2b74258b785

9 years agoDo not include '/R' in the path when generating checksums, since
Glen Barber [Fri, 8 May 2015 12:55:25 +0000 (12:55 +0000)]
Do not include '/R' in the path when generating checksums, since
that will cause '/R' to be included in the CHECKSUM files.

Sponsored by: The FreeBSD Foundation

9 years agoMove the finished image build to the '/R' directory (the
Glen Barber [Fri, 8 May 2015 12:50:48 +0000 (12:50 +0000)]
Move the finished image build to the '/R' directory (the
standard 'install' location for other architectures), then
compress the image with xz(1), and generate the CHECKSUM
files.

Sponsored by: The FreeBSD Foundation

9 years agoFix the name of the final image.
Glen Barber [Fri, 8 May 2015 10:47:57 +0000 (10:47 +0000)]
Fix the name of the final image.
Sigh.  Thou shalt not commit before coffee.

Sponsored by: The FreeBSD Foundation

9 years agoRename KERNEL.img -> OSRELEASE-KERNEL.img when complete.
Glen Barber [Fri, 8 May 2015 10:43:29 +0000 (10:43 +0000)]
Rename KERNEL.img -> OSRELEASE-KERNEL.img when complete.

Sponsored by: The FreeBSD Foundation

9 years agoDo not create the uenv.txt file for RPI-B. It is not needed.
Glen Barber [Fri, 8 May 2015 10:39:52 +0000 (10:39 +0000)]
Do not create the uenv.txt file for RPI-B.  It is not needed.

Submitted by: ian
Sponsored by: The FreeBSD Foundation

9 years agoFix path to /boot/msdos for the target image.
Glen Barber [Fri, 8 May 2015 10:38:32 +0000 (10:38 +0000)]
Fix path to /boot/msdos for the target image.

Sponsored by: The FreeBSD Foundation

9 years ago- Fix a wrong R92C_USTIME_TSF register definition
Kevin Lo [Fri, 8 May 2015 09:01:00 +0000 (09:01 +0000)]
- Fix a wrong R92C_USTIME_TSF register definition
- Fix intitial transmit rate to an 11g rate for the RTL8188EU
- Add a comment about response rate settings

9 years agooops - how'd i miss this. Sorry!
Adrian Chadd [Fri, 8 May 2015 06:02:23 +0000 (06:02 +0000)]
oops - how'd i miss this. Sorry!

9 years agoThis follows the gic and ti/aintc code by adding additional barriers to the
Ganbold Tsagaankhuu [Fri, 8 May 2015 04:38:01 +0000 (04:38 +0000)]
This follows the gic and ti/aintc code by adding additional barriers to the
Amlogic pic driver.

Differential Revision: https://reviews.freebsd.org/D2472
Submitted by: John Wehle

9 years agoThe interrupt-parent is set globally so it's unnecessary to also set it at each node.
Ganbold Tsagaankhuu [Fri, 8 May 2015 04:22:11 +0000 (04:22 +0000)]
The interrupt-parent is set globally so it's unnecessary to also set it at each node.

Differential Revision: https://reviews.freebsd.org/D2471
Submitted by: John Wehle

9 years agoAdd initial memory locality cost awareness to the VM, and include
Adrian Chadd [Fri, 8 May 2015 00:56:56 +0000 (00:56 +0000)]
Add initial memory locality cost awareness to the VM, and include
a basic ACPI SLIT table parser.

For now this just exports the map via sysctl; it'll eventually be useful
to userland when there's more useful NUMA support in -HEAD.

* Add an optional mem_locality map;
* add a mapping function taking from/to domain and returning the
  relative cost, or -1 if it's not available;
* Add a very basic SLIT parser to x86 ACPI.

Differential Revision: https://reviews.freebsd.org/D2460
Reviewed by: rpaulo, stas, jhb
Sponsored by: Norse Corp, Inc (hardware, coding); Dell (hardware)

9 years agoCopy the rpi.dtb file to the FAT partition, preventing the
Glen Barber [Thu, 7 May 2015 23:49:48 +0000 (23:49 +0000)]
Copy the rpi.dtb file to the FAT partition, preventing the
'Unrecognized partition table' error, causing boot failure.

Sponsored by: The FreeBSD Foundation

9 years agoReorder / and /boot/msdos mount to avoid the following error:
Glen Barber [Thu, 7 May 2015 23:46:33 +0000 (23:46 +0000)]
Reorder / and /boot/msdos mount to avoid the following error:
Mounting local file systems:
mount: /boot/msdos: No such file or directory

Sponsored by: The FreeBSD Foundation

9 years agoMFV r282611: netcat from OpenBSD 5.7.
Xin LI [Thu, 7 May 2015 22:54:31 +0000 (22:54 +0000)]
MFV r282611: netcat from OpenBSD 5.7.

MFC after: 2 weeks

9 years agoVendor import nc(1) from OPENBSD_5_7.
Xin LI [Thu, 7 May 2015 22:47:15 +0000 (22:47 +0000)]
Vendor import nc(1) from OPENBSD_5_7.

9 years agoAdd the SMP support for Raspberry Pi 2 (BCM2836).
Luiz Otavio O Souza [Thu, 7 May 2015 22:11:44 +0000 (22:11 +0000)]
Add the SMP support for Raspberry Pi 2 (BCM2836).

Tested with the build of some ports and a buildworld.

Submitted by: Daisuke Aoyama <aoyama@peach.ne.jp>

9 years agoReduce the size to 64 for the commands, 512 was way too large for the purpose
Baptiste Daroussin [Thu, 7 May 2015 21:30:29 +0000 (21:30 +0000)]
Reduce the size to 64 for the commands, 512 was way too large for the purpose

Noticed by: julian

9 years agodate(1): Make -r behave like GNU's version when the option can not be
Xin LI [Thu, 7 May 2015 20:54:38 +0000 (20:54 +0000)]
date(1): Make -r behave like GNU's version when the option can not be
interpreted as a number, which checks the file's modification time and
use that as the date/time value.

This improves compatibility with GNU coreutils's version of time(1).

MFC after: 2 weeks

9 years agoCreate the /boot/msdos directory so the FAT partition is mounted
Glen Barber [Thu, 7 May 2015 20:25:17 +0000 (20:25 +0000)]
Create the /boot/msdos directory so the FAT partition is mounted
properly.

Noticed by: sbruno
Sponsored by: The FreeBSD Foundation

9 years agoRemove the ZEDBOARD configuration file, as it does not
Glen Barber [Thu, 7 May 2015 20:06:39 +0000 (20:06 +0000)]
Remove the ZEDBOARD configuration file, as it does not
have a corresponding u-boot port in the Ports Collection.

Sponsored by: The FreeBSD Foundation

9 years agoSpell 'u-boot.img' correctly.
Glen Barber [Thu, 7 May 2015 20:02:50 +0000 (20:02 +0000)]
Spell 'u-boot.img' correctly.

Sponsored by: The FreeBSD Foundation

9 years agoRemove the arm/ROADMAP file.
Glen Barber [Thu, 7 May 2015 19:48:06 +0000 (19:48 +0000)]
Remove the arm/ROADMAP file.

Sponsored by: The FreeBSD Foundation

9 years agoRemove arm/Makefile.{KERNEL} files, as this project
Glen Barber [Thu, 7 May 2015 19:47:15 +0000 (19:47 +0000)]
Remove arm/Makefile.{KERNEL} files, as this project
branch is now going in a different direction than
originally planned.

Sponsored by: The FreeBSD Foundation

9 years agoFix creating directories within DESTDIR.
Glen Barber [Thu, 7 May 2015 19:10:08 +0000 (19:10 +0000)]
Fix creating directories within DESTDIR.

Sponsored by: The FreeBSD Foundation

9 years agoFix a copy/paste mistake.
Glen Barber [Thu, 7 May 2015 18:53:48 +0000 (18:53 +0000)]
Fix a copy/paste mistake.

Sponsored by: The FreeBSD Foundation

9 years agoAdd entries to uenv.txt.
Glen Barber [Thu, 7 May 2015 18:51:59 +0000 (18:51 +0000)]
Add entries to uenv.txt.

Obtained from: Crochet
Sponsored by: The FreeBSD Foundation

9 years agoEnable the growfs rc(8) script.
Glen Barber [Thu, 7 May 2015 18:49:43 +0000 (18:49 +0000)]
Enable the growfs rc(8) script.

Sponsored by: The FreeBSD Foundation

9 years agoSet NODOC=1 to avoid building the reldoc target.
Glen Barber [Thu, 7 May 2015 18:48:47 +0000 (18:48 +0000)]
Set NODOC=1 to avoid building the reldoc target.

Sponsored by: The FreeBSD Foundation

9 years agoAdd initial native suppor for RPI-B:
Glen Barber [Thu, 7 May 2015 18:47:59 +0000 (18:47 +0000)]
Add initial native suppor for RPI-B:
 - Set UBLDR_LOADADDR.
 - Include files to install to the FAT partition.

Obtained from: Crochet
Sponsored by: The FreeBSD Foundation

9 years agoRemove FDT_DIR definition, which is no longer needed.
Glen Barber [Thu, 7 May 2015 18:41:23 +0000 (18:41 +0000)]
Remove FDT_DIR definition, which is no longer needed.

Sponsored by: The FreeBSD Foundation

9 years agoAllow byte reads of AHCI registers.
Neel Natu [Thu, 7 May 2015 18:35:15 +0000 (18:35 +0000)]
Allow byte reads of AHCI registers.

This is needed to support Windows guests that use byte reads to access certain
AHCI registers (e.g. PxTFD.Status and PxTFD.Error).

Reviewed by: grehan, mav
Reported by: Leon Dang (ldang@nahannisys.com)
Differential Revision: https://reviews.freebsd.org/D2469
MFC after: 2 weeks

9 years agom_dup() is supposed to give a writable copy of an mbuf chain. It uses
Andrey V. Elsukov [Thu, 7 May 2015 18:35:01 +0000 (18:35 +0000)]
m_dup() is supposed to give a writable copy of an mbuf chain. It uses
m_dup_pkthdr(), that uses M_COPYFLAGS mask to copy m_flags field.
If original mbuf chain has M_RDONLY flag, its copy also will have it.
Reset this flag explicitly.

MFC after: 2 weeks

9 years agoReduce the number of files copied onto the FAT partition.
Glen Barber [Thu, 7 May 2015 18:32:11 +0000 (18:32 +0000)]
Reduce the number of files copied onto the FAT partition.
The DTB files are loaded from /boot/dtb on the UFS filesystem.

Submitted by: loos
Sponsored by: The FreeBSD Foundation

9 years agoIn arm_install_uboot(), mount both FAT and UFS partitions
Glen Barber [Thu, 7 May 2015 18:00:12 +0000 (18:00 +0000)]
In arm_install_uboot(), mount both FAT and UFS partitions
in the empty DESTDIR, and update path names.
Copy the ubldr to the FAT partition. [1]

Spotted by: andrew [1]
Sponsored by: The FreeBSD Foundation

9 years agoSet UBLDR_LOADADDR for the BEAGLEBONE image.
Glen Barber [Thu, 7 May 2015 17:50:24 +0000 (17:50 +0000)]
Set UBLDR_LOADADDR for the BEAGLEBONE image.

Sponsored by: The FreeBSD Foundation

9 years agoDo not rename u-boot.img file when copying to the FAT partition.
Glen Barber [Thu, 7 May 2015 17:48:19 +0000 (17:48 +0000)]
Do not rename u-boot.img file when copying to the FAT partition.

Sponsored by: The FreeBSD Foundation

9 years agoFix paths.
Glen Barber [Thu, 7 May 2015 17:40:00 +0000 (17:40 +0000)]
Fix paths.
Remove the temporary directory when done with it.
Destroy the md(4) device when done with it.

Sponsored by: The FreeBSD Foundation

9 years agoIn arm_create_disk(), chroot(8) to the build environment
Glen Barber [Thu, 7 May 2015 17:35:48 +0000 (17:35 +0000)]
In arm_create_disk(), chroot(8) to the build environment
is necessary.

In arm_install_base(), chroot(8) when installing world
and kernel.  Fix paths for fstab(5) and rc.conf(5).

Sponsored by: The FreeBSD Foundation