]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoRevert r261296. This removes the WITHOUT_NCURSESW option.
brooks [Thu, 15 May 2014 16:44:25 +0000 (16:44 +0000)]
Revert r261296.  This removes the WITHOUT_NCURSESW option.

It was the wrong direction.  We will instead remove use of the
non-wide-character supporting libncurses.

10 years agoBump FreeBSD_version for src.opts.mk changes (about a week late).
imp [Thu, 15 May 2014 15:50:37 +0000 (15:50 +0000)]
Bump FreeBSD_version for src.opts.mk changes (about a week late).

10 years agoMFV: re-add svn:mime-type where needed
des [Thu, 15 May 2014 15:49:16 +0000 (15:49 +0000)]
MFV: re-add svn:mime-type where needed

10 years agoMFV: re-add svn:mime-type where needed
des [Thu, 15 May 2014 15:49:12 +0000 (15:49 +0000)]
MFV: re-add svn:mime-type where needed

10 years agoMakefile.inc is also included by the tests subdirectory, which results
imp [Thu, 15 May 2014 15:45:45 +0000 (15:45 +0000)]
Makefile.inc is also included by the tests subdirectory, which results
in SUBDIRS having tests added to it, which fails. Work around this by
checking to make sure tests exists before adding it to subdirs and
work to get the generated file fixed so we can rename Makefile.inc to
something else so it isn't automatically included by subdirs...

10 years agoMFV: nuke autprops
des [Thu, 15 May 2014 15:28:49 +0000 (15:28 +0000)]
MFV: nuke autprops

10 years agoMFV: nuke autprops
des [Thu, 15 May 2014 15:28:43 +0000 (15:28 +0000)]
MFV: nuke autprops

10 years agoRemove dead files.
des [Thu, 15 May 2014 15:22:32 +0000 (15:22 +0000)]
Remove dead files.

10 years agooea64 uses 4k pages, too.
jhibbits [Thu, 15 May 2014 15:17:44 +0000 (15:17 +0000)]
oea64 uses 4k pages, too.

MFC after: 1 week
X-MFC-with: r266116

10 years agoImplement a PCI interrupt router to route PCI legacy INTx interrupts to
jhb [Thu, 15 May 2014 14:16:55 +0000 (14:16 +0000)]
Implement a PCI interrupt router to route PCI legacy INTx interrupts to
the legacy 8259A PICs.
- Implement an ICH-comptabile PCI interrupt router on the lpc device with
  8 steerable pins configured via config space access to byte-wide
  registers at 0x60-63 and 0x68-6b.
- For each configured PCI INTx interrupt, route it to both an I/O APIC
  pin and a PCI interrupt router pin.  When a PCI INTx interrupt is
  asserted, ensure that both pins are asserted.
- Provide an initial routing of PCI interrupt router (PIRQ) pins to
  8259A pins (ISA IRQs) and initialize the interrupt line config register
  for the corresponding PCI function with the ISA IRQ as this matches
  existing hardware.
- Add a global _PIC method for OSPM to select the desired interrupt routing
  configuration.
- Update the _PRT methods for PCI bridges to provide both APIC and legacy
  PRT tables and return the appropriate table based on the configured
  routing configuration.  Note that if the lpc device is not configured, no
  routing information is provided.
- When the lpc device is enabled, provide ACPI PCI link devices corresponding
  to each PIRQ pin.
- Add a VMM ioctl to adjust the trigger mode (edge vs level) for 8259A
  pins via the ELCR.
- Mark the power management SCI as level triggered.
- Don't hardcode the number of elements in Packages in the source for
  the DSDT.  iasl(8) will fill in the actual number of elements, and
  this makes it simpler to generate a Package with a variable number of
  elements.

Reviewed by: tycho

10 years agoAdd the missing coma
bapt [Thu, 15 May 2014 11:30:17 +0000 (11:30 +0000)]
Add the missing coma

10 years agoAdd project name to the arc config it is still required when arcanist is used with SVN
bapt [Thu, 15 May 2014 11:21:38 +0000 (11:21 +0000)]
Add project name to the arc config it is still required when arcanist is used with SVN

10 years agoFix return value. Should be logic one or zero.
br [Thu, 15 May 2014 10:06:59 +0000 (10:06 +0000)]
Fix return value. Should be logic one or zero.

10 years agounits(1): Fix minor typos
eadler [Thu, 15 May 2014 05:35:00 +0000 (05:35 +0000)]
units(1): Fix minor typos

Obtained From: DragonflyBSD

10 years agoA page mask size is 12-bits, not 11.
jhibbits [Thu, 15 May 2014 04:18:06 +0000 (04:18 +0000)]
A page mask size is 12-bits, not 11.

MFC after: 1 week

10 years agoAdd a new target cscope-hook.
rpaulo [Thu, 15 May 2014 03:47:52 +0000 (03:47 +0000)]
Add a new target cscope-hook.

This adds a Mercurial hook to automatically update the cscope data base every
time you pull, switch branch, or update.

10 years agoUpgrade to latest ldns (1.6.17) and unbound (1.4.22).
des [Thu, 15 May 2014 03:30:03 +0000 (03:30 +0000)]
Upgrade to latest ldns (1.6.17) and unbound (1.4.22).

MFC after: 3 weeks

10 years agoFix typo. Note that although this file is under contrib, it has diverged
gavin [Thu, 15 May 2014 03:08:20 +0000 (03:08 +0000)]
Fix typo.  Note that although this file is under contrib, it has diverged
sufficiently from upstream (including a full whitespace commit and large
portions rewritten) that this change does not move us further from the
upstream.

PR: docs/186608
Submitted by: Jamie Landeg-Jones <jamie@dyslexicfish.net>
MFC after: 3 days

10 years agoFix the "disks" variable reuse.
roberto [Thu, 15 May 2014 02:37:59 +0000 (02:37 +0000)]
Fix the "disks" variable reuse.

It starts off being used to track the grammar for the number of disks
(singular vs plural) and then it is reused as the list of available disks.

Replace the variable with disks_grammar and move 'disk' and 'disks' to
msg_ vars so they can be translated in the future.

Submitted by: Allan Jude <freebsd@allanjude.com>
Reviewed by: roberto
MFC after: 2 weeks
Sponsored by: ScaleEngine Inc.

10 years agoUpdates to the datasets created by zfsboot.
roberto [Thu, 15 May 2014 02:31:02 +0000 (02:31 +0000)]
Updates to the datasets created by zfsboot.

Set compress=lz4 for the entire pool, removing it from the individual
datasets

Remove exec=no from /usr/src, breaks the test suite.

Submitted by: Allan Jude <freebsd@allanjude.com>
Reviewed by: roberto
MFC after: 2 weeks
Sponsored by: ScaleEngine Inc.

10 years agoHere is a patch for the bsdinstall root-on-zfs stuff that adds optional
roberto [Thu, 15 May 2014 02:27:10 +0000 (02:27 +0000)]
Here is a patch for the bsdinstall root-on-zfs stuff that adds optional
encryption for swap, and optional gmirror for swap (which can be combined)

Submitted by: Allan Jude <freebsd@allanjude.com>
Requested By: roberto
Sponsored By: ScaleEngine Inc.
MFC after: 2 weeks

10 years agoUndo changes to the generated Makefile. Move tests directory to proper
imp [Thu, 15 May 2014 01:27:24 +0000 (01:27 +0000)]
Undo changes to the generated Makefile. Move tests directory to proper
location, including updating the test to work in the more-fragile
fmake -> bmake bootstrap environment.

10 years agoUpdate dis_tables.c to the latest Illumos version.
grehan [Thu, 15 May 2014 01:06:27 +0000 (01:06 +0000)]
Update dis_tables.c to the latest Illumos version.

This includes decodes of recent Intel instructions, in particular
VT-x and related instructions. This allows the FBT provider to
locate the exit points of routines that include these new
instructions.

Illumos issues:
 3414 Need a new word of AT_SUN_HWCAP bits
 3415 Add isainfo support for f16c and rdrand
 3416 Need disassembler support for rdrand and f16c
 3413 isainfo -v overflows 80 columns
 3417 mdb disassembler confuses rdtscp for invlpg
 1518 dis should support AMD SVM/AMD-V/Pacifica instructions
 1096 i386 disassembler should understand complex nops
 1362 add kvmstat for monitoring of KVM statistics
 1363 add vmregs[] variable to DTrace
 1364 need disassembler support for VMX instructions
 1365 mdb needs 16-bit disassembler support

This corresponds to Illumos-gate (github) version
eb23829ff08a873c612ac45d191d559394b4b408

Reviewed by: markj
MFC after: 1 week

10 years agoIncrease the TSS limit by one byte. The processor requires an additional byte
neel [Wed, 14 May 2014 22:24:09 +0000 (22:24 +0000)]
Increase the TSS limit by one byte. The processor requires an additional byte
with all bits set to 1 beyond the I/O permission bitmap.

Prior to this change accessing I/O ports [0xFFF8-0xFFFF] would trigger a
#GP fault even though the I/O bitmap allowed access to those ports.

For more details see section "I/O Permission Bit Map" in the Intel SDM, Vol 1.

Reviewed by: kib

10 years agogpioiic.4 and gpioled.4 will first appear in 10.1-RELEASE.
loos [Wed, 14 May 2014 21:54:14 +0000 (21:54 +0000)]
gpioiic.4 and gpioled.4 will first appear in 10.1-RELEASE.

10 years agoConnect vt.4 to the build.
wblock [Wed, 14 May 2014 21:45:16 +0000 (21:45 +0000)]
Connect vt.4 to the build.

Reviewed by: emaste

10 years agoGive suitably-endowed ARMs a register similar to the x86 TSC register.
markm [Wed, 14 May 2014 19:11:15 +0000 (19:11 +0000)]
Give suitably-endowed ARMs a register similar to the x86 TSC register.

Here, "suitably endowed" means that the System Control Coprocessor
(#15) has Performance Monitoring Registers, including a CCNT (Cycle
Count) register.

The CCNT register is used in a way similar to the TSC register in
x86 processors by the get_cyclecount(9) function. The entropy-harvesting
thread is a heavy user of this function, and will benefit from not
having to call binuptime(9) instead.

One problem with the CCNT register is that it is 32-bit only, so
the upper 32-bits of the returned number are always 0. The entropy
harvester does not care, but in case any one else does, follow-up
work may include an interrup trap to increment an upper-32-bit
counter on CCNT overflow.

Another problem is that the CCNT register is not readable in user-mode
code; in can be made readable by userland, but then it is also
writable, and so is a good chunk of the PMU system. For that reason,
the CCNT is not enabled for user-mode access in this commit.

Like the x86, there is one CCNT per core, so they don't all run in
perfect sync.

Reviewed by: ian@ (an earlier version)
Tested by: ian@ (same earlier version)
Committed from: WANDBOARD-QUAD

10 years agoBind ip/tcp/udp provider translators and symbols to the same versions as in
markj [Wed, 14 May 2014 19:02:00 +0000 (19:02 +0000)]
Bind ip/tcp/udp provider translators and symbols to the same versions as in
illumos, rather than using "1.0" everywhere.

Some of the translators use D functions that are not present in version
1.0 (e.g. inet_ntoa()) which can result in libdtrace crashing when running
scripts that restrict themselves to version 1.0
(e.g. with "-x version=1.0").

MFC after: 1 week

10 years agoimport unbound 1.4.22
des [Wed, 14 May 2014 18:44:22 +0000 (18:44 +0000)]
import unbound 1.4.22

10 years agoimport unbound 1.4.21
des [Wed, 14 May 2014 18:43:20 +0000 (18:43 +0000)]
import unbound 1.4.21

10 years agoMove old fmake tests into bmake and hook them to the build.
jmmv [Wed, 14 May 2014 18:43:13 +0000 (18:43 +0000)]
Move old fmake tests into bmake and hook them to the build.

This first step is mostly to prevent the code from rotting even further
and to ensure these do not get wiped when fmake's code is removed from
the tree.

These tests are currently being skipped because they detect the underlying
make is not fmake and thus disable themselves -- and the reason is that
some of the tests fail, possibly due to legitimate bugs.  Enabling them to
run against bmake will come separately.

Lastly, it would be ideal if these tests were fed upstream but they are
not ready for that yet.  In the interim, just put them under usr.bin/bmake/
while we sort things out.  The existence of a different unit-tests directory
within here makes me feel less guilty about this.

Change confirmed working with a clean amd64 build.

10 years agoimport ldns 1.6.17
des [Wed, 14 May 2014 18:41:34 +0000 (18:41 +0000)]
import ldns 1.6.17

10 years agoUse the new -d option that was added to tblgen between llvm/clang 3.3
dim [Wed, 14 May 2014 17:11:57 +0000 (17:11 +0000)]
Use the new -d option that was added to tblgen between llvm/clang 3.3
and 3.4 to generate dependency files for the '.inc.h' files generated
from .td files, and .sinclude those dependency files in clang.build.mk.

This will make future incremental builds of lib/clang and usr.bin/clang
work correctly, whenever any of the .td files get modified.

Note that this will not fix any problems with incremental builds from
*before* this revision, since there will not yet be any generated
dependency files.  A quick workaround is to run the following:

  find /usr/obj -type f -name '*.inc.h' | xargs rm

and then a regular incremental buildworld (e.g. with -DNO_CLEAN).

MFC after: 3 days

10 years agoImplement USB device side driver code for SAF1761 and compatible
hselasky [Wed, 14 May 2014 17:04:02 +0000 (17:04 +0000)]
Implement USB device side driver code for SAF1761 and compatible
chips, based on datasheet and existing USS820 DCI driver. This code is
not yet tested.

Sponsored by: DARPA, AFRL

10 years agoDocument r265995, Blowfish crypt(3) format change.
gjb [Wed, 14 May 2014 15:31:18 +0000 (15:31 +0000)]
Document r265995, Blowfish crypt(3) format change.

Sponsored by: The FreeBSD Foundation

10 years agoDocument r265876, power management bug with Intel Turbo Boost.
gjb [Wed, 14 May 2014 15:31:16 +0000 (15:31 +0000)]
Document r265876, power management bug with Intel Turbo Boost.

Sponsored by: The FreeBSD Foundation

10 years agoFix typo.
br [Wed, 14 May 2014 14:19:57 +0000 (14:19 +0000)]
Fix typo.

10 years agoDisable configuration of the host frame interval register until
hselasky [Wed, 14 May 2014 11:32:15 +0000 (11:32 +0000)]
Disable configuration of the host frame interval register until
further, hence it breaks USB support on some non-RPI platforms.

10 years agoMake sure the USB audio driver is loaded last. This is important when
hselasky [Wed, 14 May 2014 11:25:59 +0000 (11:25 +0000)]
Make sure the USB audio driver is loaded last. This is important when
built as part of a kernel module to prevent panics when the USB audio
driver kernel module is unloaded.

Suggested by: marius @
MFC after: 1 week

10 years agoRemove extra newlines.
ray [Wed, 14 May 2014 11:15:48 +0000 (11:15 +0000)]
Remove extra newlines.
No functional changes.

Sponsored by: The FreeBSD Foundation

10 years agoInitialize loginclass mutex using MTX_SYSINIT instead of using SI_SUB_CPU.
trasz [Wed, 14 May 2014 09:03:02 +0000 (09:03 +0000)]
Initialize loginclass mutex using MTX_SYSINIT instead of using SI_SUB_CPU.

Suggested by: rwatson@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation

10 years agoChange the USB audio kernel module linking order, so that the USB
hselasky [Wed, 14 May 2014 07:33:06 +0000 (07:33 +0000)]
Change the USB audio kernel module linking order, so that the USB
audio device driver is detached first and not its children. This fixes
a panic in some cases when unloading "snd_uaudio" while a USB device
is plugged. The linking order affects the order in which the module
dependencies are registered.

MFC after: 1 week

10 years agoSwitch using the new $2b$ format by default, when bcrypt is used.
delphij [Wed, 14 May 2014 00:50:31 +0000 (00:50 +0000)]
Switch using the new $2b$ format by default, when bcrypt is used.

MFC after: 2 weeks
Relnotes: default Blowfish crypt(3) format have been changed to $2b$.

10 years agoFix OpenSSL NULL pointer deference vulnerability.
delphij [Tue, 13 May 2014 23:17:24 +0000 (23:17 +0000)]
Fix OpenSSL NULL pointer deference vulnerability.

Obtained from: OpenBSD
Security: FreeBSD-SA-14:09.openssl
Security: CVE-2014-0198

10 years agoMFV of 265975, tzdata2014c
edwin [Tue, 13 May 2014 21:25:59 +0000 (21:25 +0000)]
MFV of 265975, tzdata2014c

- Egypt will go into DST on 15 May 2014

10 years agoprintf: Fix missing arguments for %u/%o/%x/%X after r265592.
jilles [Tue, 13 May 2014 21:24:55 +0000 (21:24 +0000)]
printf: Fix missing arguments for %u/%o/%x/%X after r265592.

If a numeric argument is missing, zero should be assumed, for signed as well
as unsigned conversions.

This fixes the 'zero' regression tests.

r265592 erroneously reverted r244407.

10 years agoDon't include the guest memory segments in the bhyve(8) process core dump.
neel [Tue, 13 May 2014 16:40:27 +0000 (16:40 +0000)]
Don't include the guest memory segments in the bhyve(8) process core dump.
This has not added a lot of value when debugging bhyve issues while greatly
increasing the time and space required to store the core file.

Passing the "-C" option to bhyve(8) will change the default and dump guest
memory in the core dump.

Requested by: grehan
Reviewed by: grehan

10 years agoAdd mention of metadata version 7 in FreeBSD 10.0
thomas [Tue, 13 May 2014 15:46:52 +0000 (15:46 +0000)]
Add mention of metadata version 7 in FreeBSD 10.0

Reviewed by: pjd
MFC after: 1 day

10 years ago- Isochronous transfers should use the alternate next transfer
hselasky [Tue, 13 May 2014 13:46:38 +0000 (13:46 +0000)]
- Isochronous transfers should use the alternate next transfer
descriptor upon receiving a short packet, in host and device mode.
- Correct some comments.

10 years agoOn a fork allow read-only wired pages to be copy-on-write shared between the
alc [Tue, 13 May 2014 13:20:23 +0000 (13:20 +0000)]
On a fork allow read-only wired pages to be copy-on-write shared between the
parent and child processes.  Previously, we copied these pages even though
they are read only.  However, the reason for copying them is historical and
no longer exists.  In recent times, vm_map_protect() has developed the
ability to copy pages when write access is added to wired copy-on-write
pages.  So, in this case, copy-on-write sharing of wired pages is not to be
feared.  It is not going to lead to copy-on-write faults on wired memory.

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

10 years agoDisable TX IP/TCP/UDP checksum offloading for RTL8168C/RTL8168CP.
yongari [Tue, 13 May 2014 05:19:29 +0000 (05:19 +0000)]
Disable TX IP/TCP/UDP checksum offloading for RTL8168C/RTL8168CP.
Previously only TX IP checksum offloading was disabled but it's
reported that TX checksum offloading for UDP datagrams with IP
options also generates corrupted frames.  Reporter's controller is
RTL8168CP but I guess RTL8168C also have the same issue since it
shall share the same core.

Reported and tested by: tuexen

10 years agoFix checksum computation. Previously it didn't include carry.
yongari [Tue, 13 May 2014 05:07:03 +0000 (05:07 +0000)]
Fix checksum computation.  Previously it didn't include carry.

Reviewed by: tuexen

10 years agoabort(3) the process in response to a VMEXIT_ABORT. This usually happens in
neel [Mon, 12 May 2014 23:35:10 +0000 (23:35 +0000)]
abort(3) the process in response to a VMEXIT_ABORT. This usually happens in
response to an unhandled VM exit or an unexpected error so a core is useful.

Remove unused macro VMEXIT_SWITCH.

Reviewed by: grehan

10 years agoFix delete-old when WITH_TESTS is set.
jmmv [Mon, 12 May 2014 21:21:32 +0000 (21:21 +0000)]
Fix delete-old when WITH_TESTS is set.

r265423 removed the WITHOUT_BMAKE option, which in turn broke a conditional
in OptionalObsoleteFiles.inc that inspected MK_BMAKE.

10 years agoBe even more paranoid about overflow.
truckman [Mon, 12 May 2014 20:22:42 +0000 (20:22 +0000)]
Be even more paranoid about overflow.

Requested by: ache

10 years agoUpdate terminal sizes in any case when new vt(4) driver arrive.
ray [Mon, 12 May 2014 19:29:38 +0000 (19:29 +0000)]
Update terminal sizes in any case when new vt(4) driver arrive.
(Plus remove one unused newline)

Sponsored by: The FreeBSD Foundation

10 years ago(NANO_CONFIG): New variable containing path of config file, so that
thomas [Mon, 12 May 2014 19:11:39 +0000 (19:11 +0000)]
(NANO_CONFIG): New variable containing path of config file, so that
the configuration can reference additional files relative to its own
location.

(NANO_MODULES): If set to "default", install all built modules.

Reviewed by: imp
MFC after: 1 week

10 years agoUpgrade our copy of llvm/clang to 3.4.1 release. This release contains
dim [Mon, 12 May 2014 18:45:56 +0000 (18:45 +0000)]
Upgrade our copy of llvm/clang to 3.4.1 release.  This release contains
mostly fixes, for the following upstream bugs:

http://llvm.org/PR16365 http://llvm.org/PR17473 http://llvm.org/PR18000
http://llvm.org/PR18068 http://llvm.org/PR18102 http://llvm.org/PR18165
http://llvm.org/PR18260 http://llvm.org/PR18290 http://llvm.org/PR18316
http://llvm.org/PR18460 http://llvm.org/PR18473 http://llvm.org/PR18515
http://llvm.org/PR18526 http://llvm.org/PR18600 http://llvm.org/PR18762
http://llvm.org/PR18773 http://llvm.org/PR18860 http://llvm.org/PR18994
http://llvm.org/PR19007 http://llvm.org/PR19010 http://llvm.org/PR19033
http://llvm.org/PR19059 http://llvm.org/PR19144 http://llvm.org/PR19326

MFC after: 2 weeks

10 years agoBump copyright date
skreuzer [Mon, 12 May 2014 17:58:17 +0000 (17:58 +0000)]
Bump copyright date

Approved by: hrs@ (mentor)

10 years agoNuke a couple of unnecessary assigments. Nothing uses the values of rstart
truckman [Mon, 12 May 2014 17:56:52 +0000 (17:56 +0000)]
Nuke a couple of unnecessary assigments.  Nothing uses the values of rstart
and rend after this point.

MFC after: 1 week

10 years agoBuild modules in parallel. This has been tested by several people at
ian [Mon, 12 May 2014 13:33:12 +0000 (13:33 +0000)]
Build modules in parallel.  This has been tested by several people at
various -j levels from 6 to 48 without problems.

10 years agoCleanup some style nits.
ian [Mon, 12 May 2014 13:08:37 +0000 (13:08 +0000)]
Cleanup some style nits.

10 years agoInterrupts need to be disabled on entry to cpu_sleep() for ARM. Given
ian [Mon, 12 May 2014 13:05:03 +0000 (13:05 +0000)]
Interrupts need to be disabled on entry to cpu_sleep() for ARM.  Given
that and the need to be in a critical section when switching to idleclock
mode for event timers, use spinlock_enter()/exit() to achieve both needs.

The ARM WFI (wait for interrupt) instruction blocks until an interrupt is
asserted, and it will unblock even if interrupts are masked, and it will
unblock immediately if an interrupt is already pending.  It is necessary
to execute it with interrupts disabled, otherwise the interrupt that
should unblock it may occur and be serviced just prior to executing the
instruction.  At that point the system is inappropriately asleep until
the next timer tick or some other random interrupt happens.

In general, interrupts need to be disabled continuously from the time the
decision is made that there is no work to be done and sleeping is needed
until actually going to sleep, to avoid a race where handling a new
interrupt changes the basis for deciding there is no work to be done.

Submitted by: hps@ (in slightly different form)

10 years agoDisable TX checksum offload for UDP-Lite completely. It wasn't used for
tuexen [Mon, 12 May 2014 09:46:48 +0000 (09:46 +0000)]
Disable TX checksum offload for UDP-Lite completely. It wasn't used for
partial checksum coverage, but even for full checksum coverage it doesn't
work.
This was discussed with Kevin Lo (kevlo@).

10 years agoCreate driver file templates, kernel module Makefile and add initial
hselasky [Mon, 12 May 2014 09:05:07 +0000 (09:05 +0000)]
Create driver file templates, kernel module Makefile and add initial
version of register definitions for ISP1761 and SAF1761 compatible
chips.

Sponsored by: DARPA, AFRL

10 years agounits(1): call el_end()
eadler [Mon, 12 May 2014 07:14:09 +0000 (07:14 +0000)]
units(1): call el_end()

Add missing el_end() call

10 years agounits(1): unbreak -f option, fix some style, increase compatibility.
eadler [Mon, 12 May 2014 06:14:14 +0000 (06:14 +0000)]
units(1): unbreak -f option, fix some style, increase compatibility.

- Unbreak the -f option: it was missing a ':'
- gunits -V spits out more information than just its version: attempt to do so
  as well.

10 years agounits(1): use common functions
eadler [Mon, 12 May 2014 05:44:55 +0000 (05:44 +0000)]
units(1): use common functions

No need to replicate strdup

10 years agoRepair some races in IPI handling:
nwhitehorn [Mon, 12 May 2014 02:56:27 +0000 (02:56 +0000)]
Repair some races in IPI handling:
1. Make sure IPI mask is set before sending the IPI
2. Operate atomically on PS3 PIC outstanding interrupt list
3. Make sure IPIs are EOI'ed before, not after, processing. Without this,
   a second IPI could be sent partway through processing the first one,
   get erroneously acknowledge by the EOI to the first, and be lost. In
   particular in the case of smp_rendezvous(), this can be fatal.

In combination, this makes the PS3 boot SMP again. It probably also fixes
some latent bugs elsewhere.

MFC after: 2 weeks

10 years agos/JIRA/Jenkins/g in comments. I was confused.
imp [Mon, 12 May 2014 01:47:45 +0000 (01:47 +0000)]
s/JIRA/Jenkins/g in comments. I was confused.

10 years agoAttempt to walk a fine line between current usage (/usr/ports which
imp [Sun, 11 May 2014 23:22:32 +0000 (23:22 +0000)]
Attempt to walk a fine line between current usage (/usr/ports which
does an out-of-tree build without setting MAKESYSPATH) and recently
added requirements (JIRA's building the modules in a non-standard
layout). So, when MAKESYSPATH is defined, trust that it will do the
right thing (to catch the JIRA use case). When it isn't defined,
assume a standard FreeBSD tree and reach over to grab bsd.mkopt.mk (to
fix the /usr/ports use case). Both camps cannot be appeased otherwise,
so we have this kludge until it can be sorted out.

10 years agoaccept(),accept4(): Don't set *addrlen = 0 on [ECONNABORTED].
jilles [Sun, 11 May 2014 21:21:14 +0000 (21:21 +0000)]
accept(),accept4(): Don't set *addrlen = 0 on [ECONNABORTED].

If the underlying protocol reported an error (e.g. because a connection was
closed while waiting in the queue), this error was also indicated by
returning a zero-length address. For all other kinds of errors (e.g.
[EAGAIN], [ENFILE], [EMFILE]), *addrlen is unmodified and there are
successful cases where a zero-length address is returned (e.g. a connection
from an unbound Unix-domain socket), so this error indication is not
reliable.

As reported in Austin Group bug #836, modifying *addrlen on error may cause
subtle bugs if applications retry the call without resetting *addrlen.

10 years agoAllow libstdc++ and libsupc++ to compile with clang again, after the
dim [Sun, 11 May 2014 21:07:00 +0000 (21:07 +0000)]
Allow libstdc++ and libsupc++ to compile with clang again, after the
bsd.*.mk infrastructure changes.  Apparently, you must now modify
CXXFLAGS *before* including bsd.lib.mk, or your changes will be lost.

10 years agoMinor fixes to previous change introducing switch -H, as per comments
thomas [Sun, 11 May 2014 18:49:18 +0000 (18:49 +0000)]
Minor fixes to previous change introducing switch -H, as per comments
on -arch.

Reviewed by: gleb

10 years agoOF_peer() in IEEE 1275 returns 0 if no peer exists, not -1.
nwhitehorn [Sun, 11 May 2014 18:22:05 +0000 (18:22 +0000)]
OF_peer() in IEEE 1275 returns 0 if no peer exists, not -1.

10 years agoFix locking. The dst_object must remain locked on the retry of the
kib [Sun, 11 May 2014 18:07:07 +0000 (18:07 +0000)]
Fix locking.  The dst_object must remain locked on the retry of the
loop iteration.

Reported and tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 6 days

10 years agoWith the new-and-improved vm_fault_copy_entry() (r265843), we can always
alc [Sun, 11 May 2014 17:41:29 +0000 (17:41 +0000)]
With the new-and-improved vm_fault_copy_entry() (r265843), we can always
avoid soft page faults when adding write access to user wired entries in
vm_map_protect().  Previously, we only avoided the soft page fault when
the underlying pages were copy-on-write.  In other words, we avoided the
pages faults that might sleep on page allocation, but not the trivial
page faults to update the physical map.

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

10 years agoprintf: fix regression after illumos merges.
pfg [Sun, 11 May 2014 17:28:57 +0000 (17:28 +0000)]
printf: fix regression after illumos merges.

The "bltin/bltin.h" wrappers do not support exit() and attempting
to call it will exit sh completely.

Note that errx() is acceptable but will always return with status 2.

Reported by: jilles (and the testing framework)
Fix by: jilles
Pointyhat: pfg

10 years agoFix interrupt allocation after changes to nexus. This makes PS3 boot
nwhitehorn [Sun, 11 May 2014 16:49:31 +0000 (16:49 +0000)]
Fix interrupt allocation after changes to nexus. This makes PS3 boot
multiuser again (this commit comes from the PS3 itself). Some problems
still exist with SMP, apparently, as I had to boot a non-SMP kernel to
get here.

10 years agoinclude: Don't expose L_cuserid in strict C standard compliance mode.
jilles [Sun, 11 May 2014 16:34:17 +0000 (16:34 +0000)]
include: Don't expose L_cuserid in strict C standard compliance mode.

L_cuserid is supposed to be exposed only for old POSIX, or in the default
(expose everything) environment.

10 years agoinclude: Remove checks for __BSD_VISIBLE where redundant with __XSI_VISIBLE
jilles [Sun, 11 May 2014 13:48:21 +0000 (13:48 +0000)]
include: Remove checks for __BSD_VISIBLE where redundant with __XSI_VISIBLE
or __POSIX_VISIBLE.

Whenever <sys/cdefs.h> sets __BSD_VISIBLE to non-zero, it also sets
__POSIX_VISIBLE and __XSI_VISIBLE to the newest version supported.

No functional change is intended.

10 years agoRevert accidental commit of SUBDIR_PARALLEL for sys/modules. (It hasn't
ian [Sun, 11 May 2014 12:55:31 +0000 (12:55 +0000)]
Revert accidental commit of SUBDIR_PARALLEL for sys/modules.  (It hasn't
been tested sufficiently).

10 years agoIn cf_get_method, when we don't already know what clock speed the CPU is
cperciva [Sun, 11 May 2014 10:32:58 +0000 (10:32 +0000)]
In cf_get_method, when we don't already know what clock speed the CPU is
running at, guess the nearest value instead of looking for a value within
25 MHz of the observed frequency.

Prior to this change, if a system booted with Intel Turbo Boost enabled,
the dev.cpu.0.freq sysctl is nonfunctional, since the ACPI-reported
frequency for Turbo Boost states does not match the actual clock frequency
(and thus no levels are within 25 MHz of the observed frequency) and the
current performance level is read before a new level is set.

MFC after: 3 days
Relnotes: Bug fix in power management on CPUs with Intel Turbo Boost

10 years agoTypo fixes and some language/punctuation improvements.
brueffer [Sun, 11 May 2014 10:06:27 +0000 (10:06 +0000)]
Typo fixes and some language/punctuation improvements.

10 years agoOptimise host mode data roundtrip time. When BULK data is submitted to
hselasky [Sun, 11 May 2014 08:17:46 +0000 (08:17 +0000)]
Optimise host mode data roundtrip time. When BULK data is submitted to
the main processing queue, clear the NAK counter for any associated
BULK or CONTROL transfers and poll the endpoint(s) for 1 millisecond
at 125us rate interval, before going into slow, 10ms, NAK polling mode
again.  This has the effect that typical ping-ping protocols respond
quicker when initiated from the USB host.

MFC after: 2 weeks

10 years agoMove the PS3 framebuffer console to use vt instead of syscons and adjust
nwhitehorn [Sun, 11 May 2014 05:49:35 +0000 (05:49 +0000)]
Move the PS3 framebuffer console to use vt instead of syscons and adjust
GENERIC64 for PowerPC to use vt with it.

Much to my chagrin, PS3 support seems to have bitrotted somewhat since the
last time I tried it. ehci panics on attach and interrupt handling seems
to be faulty. This should be fixed soon...

10 years agoAdd cpu_l2cache_drain_writebuf(), use it to implement generic_bs_barrier().
ian [Sun, 11 May 2014 04:24:57 +0000 (04:24 +0000)]
Add cpu_l2cache_drain_writebuf(), use it to implement generic_bs_barrier().

On modern ARM SoCs the L2 cache controller sits between the CPU and the
AXI bus, and most on-chip memory-mapped devices are on the AXI bus.  We
map the device registers using the 'Device' memory attribute, which means
the memory is not cached, but writes to it are buffered.  Ensuring that a
write has made it all the way to a device may require that the L2
controller take some action.

There is currently only one implementation of the new function, for the
PL310 cache controller.  It invokes a function that the controller
manual calls "cache sync" but it actually has nothing to do with cache at
all, it triggers a drain of all pending store buffer writes and it blocks
until they complete.

The sheeva and xscale L2 controllers (which predate the concept of Device
memory) don't seem to have a corresponding function.  It appears that the
standard armv5 drain_writebuf function includes draining all the way
through the L2 controller.

10 years agoEnable SMP for Exynos-based platforms (i.e. Chromebook)
grehan [Sun, 11 May 2014 04:18:51 +0000 (04:18 +0000)]
Enable SMP for Exynos-based platforms (i.e. Chromebook)

Reviewed by: br

10 years agoUse vt(4) by default on 32-bit PowerPC now that it is fully functional and
nwhitehorn [Sun, 11 May 2014 02:18:17 +0000 (02:18 +0000)]
Use vt(4) by default on 32-bit PowerPC now that it is fully functional and
fast. 64-bit PowerPC will follow along once the PS3 framebuffer driver is
adapted.

10 years agoPort over mmap routine from syscons. This lets X11 work on PowerPC with vt.
nwhitehorn [Sun, 11 May 2014 02:16:08 +0000 (02:16 +0000)]
Port over mmap routine from syscons. This lets X11 work on PowerPC with vt.
The last obstacle to switching PowerPC entirely to vt is that the Playstation 3
framebuffer driver needs to be ported over. This only applies for powerpc64,
however.

10 years agomesg: remove advertising clause
eadler [Sun, 11 May 2014 02:04:40 +0000 (02:04 +0000)]
mesg: remove advertising clause

The University of California board of trustees has given permission to remove
the advertising clause of all software attributed to it.

10 years agolook(1): add compability with other implementations.
eadler [Sun, 11 May 2014 02:00:48 +0000 (02:00 +0000)]
look(1): add compability with other implementations.

On other implementations 'look -a' uses an alternate dictionary.  Since we don't
have one, just ignore it.

10 years agoMake ofwfb not be painfully slow. This reduces the time for a verbose boot
nwhitehorn [Sun, 11 May 2014 01:58:56 +0000 (01:58 +0000)]
Make ofwfb not be painfully slow. This reduces the time for a verbose boot
on my G4 iBook by more than half. Still 10% slower than syscons, but that's
much better than a factor of 2.

The slowness had to do with pathological write performance on 8-bit
framebuffers, which are almost universally used on Open Firmware systems.
Writing 1 byte at a time, potentially nonconsecutively, resulted in many
extra PCI write cycles. This patch, in the common case where it's writing
one or several characters in an 8x8 font, gangs the writes together into
a set of 32-bit writes. This is a port of r143830 to vt(4).

The EFI framebuffer is also extremely slow, probably for the same reason,
and the same patch will likely help there.

10 years agolibedit: add H_SAVE_FP which saves history to a file pointer.
eadler [Sun, 11 May 2014 01:44:11 +0000 (01:44 +0000)]
libedit: add H_SAVE_FP which saves history to a file pointer.

H_SAVE_FP is similar to H_SAVE but operates on a FILE* instead of a filename.
This is useful when operating in capability mode.

Reviewed by: christos@NetBSD.org, pfg

10 years agoMake ofwfb actually work again. Apparently the API it was written against
nwhitehorn [Sun, 11 May 2014 01:19:55 +0000 (01:19 +0000)]
Make ofwfb actually work again. Apparently the API it was written against
still exists but is now silently ignored by the VT core. At least xboxfb
needs similar changes.

10 years agoMake the hardware memory and instruction barrier functions work on armv4
ian [Sun, 11 May 2014 00:43:06 +0000 (00:43 +0000)]
Make the hardware memory and instruction barrier functions work on armv4
and armv5 as well.

10 years agoprinf: replace use of alloca with variable length array.
pfg [Sat, 10 May 2014 22:27:01 +0000 (22:27 +0000)]
prinf: replace use of alloca with variable length array.

Use of alloca(3) is discouraged in FreeBSD. Using a VLA
is simple and should be more portable.

Requested by: jilles

10 years agoRename platform_gpio_init to be SoC specific
andrew [Sat, 10 May 2014 21:30:19 +0000 (21:30 +0000)]
Rename platform_gpio_init to be SoC specific

10 years agoReally, I don't want to install src.opts.mk at all.
imp [Sat, 10 May 2014 21:27:47 +0000 (21:27 +0000)]
Really, I don't want to install src.opts.mk at all.

10 years agoRename platform_gpio_init to be platform specific, and make it static as
andrew [Sat, 10 May 2014 20:31:05 +0000 (20:31 +0000)]
Rename platform_gpio_init to be platform specific, and make it static as
it's only used from this file.