]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agoDo not return from thread_single(SINGLE_BOUNDARY) until all stopped
kib [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
kib [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
bz [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.
loos [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.
loos [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.
stas [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.
delphij [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
bapt [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.
loos [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 [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.
jhb [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.
jhb [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,
gjb [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
zbb [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
gjb [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
gjb [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
hselasky [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
hselasky [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
hselasky [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
bdrewery [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.
gjb [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.
gjb [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
hselasky [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"
hselasky [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
jhb [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.
gjb [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
jhb [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.
gjb [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.
gjb [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.
gjb [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.
gjb [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.
gjb [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.
gjb [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
royger [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
gjb [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
avg [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
gjb [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 agoDo not include '/R' in the path when generating checksums, since
gjb [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
gjb [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.
gjb [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.
gjb [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.
gjb [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.
gjb [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
kevlo [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 [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 [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 [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 [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
gjb [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:
gjb [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.
delphij [Thu, 7 May 2015 22:54:31 +0000 (22:54 +0000)]
MFV r282611: netcat from OpenBSD 5.7.

MFC after: 2 weeks

9 years agoAdd the SMP support for Raspberry Pi 2 (BCM2836).
loos [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
bapt [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
delphij [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
gjb [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
gjb [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.
gjb [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.
gjb [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
gjb [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.
gjb [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.
gjb [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.
gjb [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.
gjb [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.
gjb [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:
gjb [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.
gjb [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 [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
ae [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.
gjb [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
gjb [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.
gjb [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.
gjb [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.
gjb [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
gjb [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

9 years agoFix file/directory paths.
gjb [Thu, 7 May 2015 17:33:21 +0000 (17:33 +0000)]
Fix file/directory paths.

Sponsored by: The FreeBSD Foundation

9 years agoCorrect PL310_POWER_CTRL offset
emaste [Thu, 7 May 2015 16:56:20 +0000 (16:56 +0000)]
Correct PL310_POWER_CTRL offset

Offet for the power control register was specified incorrectly (it had
the same value as the prefetch control register.) This change corrects
the offset value to 0xF80, per the ARM PL310 documentation.

Submitted by: Steve Kiernan <stevek@juniper.net>
Obtained from: Juniper Networks, Inc.

9 years agoMark data checksum as valid for multicast packets, that we send back
ae [Thu, 7 May 2015 14:17:43 +0000 (14:17 +0000)]
Mark data checksum as valid for multicast packets, that we send back
to myself via simloop.
Also remove duplicate check under #ifdef DIAGNOSTIC.

PR: 180065
MFC after: 1 week

9 years agoAdd support for DYMO LabelWriter PnP.
hselasky [Thu, 7 May 2015 12:54:27 +0000 (12:54 +0000)]
Add support for DYMO LabelWriter PnP.

MFC after: 2 weeks

9 years agoClean up the ARM kernel configs to use 'include<space><tab>"file"'.
andrew [Thu, 7 May 2015 12:38:23 +0000 (12:38 +0000)]
Clean up the ARM kernel configs to use 'include<space><tab>"file"'.

9 years agoRemove unneded #ifdef INET6 and IPSEC. This file compiled only when
ae [Thu, 7 May 2015 12:15:45 +0000 (12:15 +0000)]
Remove unneded #ifdef INET6 and IPSEC. This file compiled only when
both options are defined.
Include opt_sctp.h and sctp_crc32.h to enable #ifdef SCTP code block
and delayed checksum calculation for SCTP.

9 years agoRemove references to Giant in namei(9). This was removed in r241896.
bdrewery [Thu, 7 May 2015 01:55:39 +0000 (01:55 +0000)]
Remove references to Giant in namei(9).  This was removed in r241896.

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoIn release.sh, create the /dev directory within the chroot
gjb [Thu, 7 May 2015 00:27:28 +0000 (00:27 +0000)]
In release.sh, create the /dev directory within the chroot
before attempting to mount(8) devfs.  Also, create the
.OBJDIR for the 'release' target, so files end up in the
correct location.

In tools/arm.subr, fix the target device when creating the
gpart partition scheme.

Sponsored by: The FreeBSD Foundation

9 years agoCheck 'td_owepreempt' and yield the vcpu thread if it is set.
neel [Wed, 6 May 2015 23:40:24 +0000 (23:40 +0000)]
Check 'td_owepreempt' and yield the vcpu thread if it is set.

This is done explicitly because a vcpu thread can be in a critical section
for the entire time slice alloted to it. This in turn can delay the handling
of the 'td_owepreempt'.

Reviewed by: jhb
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D2430

9 years agoUse the correct variable for the tools/TARGET.conf file.
gjb [Wed, 6 May 2015 23:26:51 +0000 (23:26 +0000)]
Use the correct variable for the tools/TARGET.conf file.

Sponsored by: The FreeBSD Foundation

9 years agoFix up panics when fork fails due to hitting proc limit
mjg [Wed, 6 May 2015 21:03:19 +0000 (21:03 +0000)]
Fix up panics when fork fails due to hitting proc limit

The function clearning credentials on failure asserts the process is a
zombie, which is not true when fork fails.

Changing creds to NULL is unnecessary, but is still being done for
consistency with other code.

Pointy hat: mjg
Reported by: pho

9 years agoAdd tools/arm.subr to contain common subroutines used for
gjb [Wed, 6 May 2015 19:58:12 +0000 (19:58 +0000)]
Add tools/arm.subr to contain common subroutines used for
building arm images.  This is similar to tools/vmimage.subr
used for building virtual machine disk images.  By default,
only arm_create_disk() and arm_install_base() contain real
functionality here, and arm_install_uboot() must be overridden
in the arm/KERNEL.conf file.

In release.sh, make create_arm_armv6_build_release() do
something now.

In arm/BEAGLEBONE.conf, set IMAGE_SIZE, PART_SCHEME, FAT_SIZE,
FAT_TYPE, and MD_ARGS, as well as make arm_install_uboot()
functional.

Parts of this were taken from disecting a previous BEAGLEBONE
image, and other parts obtained from Crochet sources.

Sponsored by: The FreeBSD Foundation

9 years agoHandle EDQUOT backend storage errors same as ENOSPC.
mav [Wed, 6 May 2015 19:47:31 +0000 (19:47 +0000)]
Handle EDQUOT backend storage errors same as ENOSPC.

MFC after: 1 week

9 years agoEvaluage chroot_build_release_cmd based on the TARGET/TARGET_ARCH
gjb [Wed, 6 May 2015 18:16:27 +0000 (18:16 +0000)]
Evaluage chroot_build_release_cmd based on the TARGET/TARGET_ARCH
of the build target.

Move arm/armv6 'release' bits to chroot_arm_armv6_build_release().

Sponsored by: The FreeBSD Foundation

9 years agoAdd memory barrier to r281764.
mav [Wed, 6 May 2015 18:04:31 +0000 (18:04 +0000)]
Add memory barrier to r281764.

While race at this point may cause only a single packet delay and so was
not really reproduced, it is better to not have it at all.

MFC after: 1 week

9 years agoTweak the comment here some more. In particular, the previous opening
jhb [Wed, 6 May 2015 17:23:42 +0000 (17:23 +0000)]
Tweak the comment here some more.  In particular, the previous opening
sentence was a bit confusing.

Noted by: kib

9 years agoPrinting interface names:
glebius [Wed, 6 May 2015 16:43:44 +0000 (16:43 +0000)]
Printing interface names:

o Restore historical behaviour of appending '*' if interface is down,
  and we have enough space to print it (usually we don't). [1]
o Do not truncate interface names when printing in encoded format.
o Report interface flags into encoded format.

PR: 199873 [1]
Sponsored by: Nginx, Inc.

9 years agoDeprecate the 3-way return values from vm_gla2gpa() and vm_copy_setup().
neel [Wed, 6 May 2015 16:25:20 +0000 (16:25 +0000)]
Deprecate the 3-way return values from vm_gla2gpa() and vm_copy_setup().

Prior to this change both functions returned 0 for success, -1 for failure
and +1 to indicate that an exception was injected into the guest.

The numerical value of ERESTART also happens to be -1 so when these functions
returned -1 it had to be translated to a positive errno value to prevent the
VM_RUN ioctl from being inadvertently restarted. This made it easy to introduce
bugs when writing emulation code.

Fix this by adding an 'int *guest_fault' parameter and setting it to '1' if
an exception was delivered to the guest. The return value is 0 or EFAULT so
no additional translation is needed.

Reviewed by: tychon
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D2428

9 years agobuildenv_setup(), if overridden in the configuration file,
gjb [Wed, 6 May 2015 16:21:12 +0000 (16:21 +0000)]
buildenv_setup(), if overridden in the configuration file,
only needs to be invoked once.

Sponsored by: The FreeBSD Foundation

9 years agoRemove Crochet invocation.
gjb [Wed, 6 May 2015 16:04:11 +0000 (16:04 +0000)]
Remove Crochet invocation.

Sponsored by: The FreeBSD Foundation

9 years agoRemove crochet configuration files and tools/arm/ directory.
gjb [Wed, 6 May 2015 15:59:29 +0000 (15:59 +0000)]
Remove crochet configuration files and tools/arm/ directory.

Sponsored by: The FreeBSD Foundation

9 years agoUpdate the arm/*.conf configuration files to only set
gjb [Wed, 6 May 2015 15:58:21 +0000 (15:58 +0000)]
Update the arm/*.conf configuration files to only set
EMBEDDEDBUILD, EMBEDDED_TARGET, EMBEDDED_TARGET_ARCH,
EMBEDDEDPORTS, and KERNEL.

In release.sh, set TARGET and TARGET_ARCH to the
EMBEDDED_* variants from the configuration file.

Sponsored by: The FreeBSD Foundation

9 years agoIn extra_chroot_setup(), use 'uname -U' to determine OSVERSION.
gjb [Wed, 6 May 2015 15:41:43 +0000 (15:41 +0000)]
In extra_chroot_setup(), use 'uname -U' to determine OSVERSION.

Move the port build for EMBEDDEDPORTS (if set) from arm/release.sh
to release.sh.

Remove arm/release.sh.

Sponsored by: The FreeBSD Foundation

9 years agoRemove the note about seekdir() removing telldir() cookies. That was
jhb [Wed, 6 May 2015 15:30:05 +0000 (15:30 +0000)]
Remove the note about seekdir() removing telldir() cookies.  That was
removed back in r269204.

MFC after: 3 days

9 years agoRemove historical GNUC test
emaste [Wed, 6 May 2015 15:29:11 +0000 (15:29 +0000)]
Remove historical GNUC test

The requirement is for a GCC-compatible compiler and not necessarily
GCC itself. However, we currently expect any compiler used for building
the whole of FreeBSD to be GCC-compatible and many things will break if
not; there's no longer a need to have an explicit test for this in rtld.

Reviewed by: imp, kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D2422

9 years agoA few style fixes and expand the comment a bit on what _fixtelldir() is
jhb [Wed, 6 May 2015 15:25:20 +0000 (15:25 +0000)]
A few style fixes and expand the comment a bit on what _fixtelldir() is
doing.