Commit Graph

196807 Commits

Author SHA1 Message Date
Justin Hibbits
59bb84753c Use proper signed types. The ADT746x uses signed 8-bit numbers for the
temperature.

MFC after:	2 weeks
2015-01-18 07:08:06 +00:00
Oleksandr Tymoshenko
81d8de5f75 Fix programming timing parameters to LCDC. Actual value used for HBP, HFP, HSW, VSW
is register's programmed value + 1.
2015-01-18 06:43:09 +00:00
Warner Losh
a66412fc4c Include mca_machdep.h. 2015-01-18 03:43:47 +00:00
Neel Natu
d087a39935 Simplify instruction restart logic in bhyve.
Keep track of the next instruction to be executed by the vcpu as 'nextrip'.
As a result the VM_RUN ioctl no longer takes the %rip where a vcpu should
start execution.

Also, instruction restart happens implicitly via 'vm_inject_exception()' or
explicitly via 'vm_restart_instruction()'. The APIs behave identically in
both kernel and userspace contexts. The main beneficiary is the instruction
emulation code that executes in both contexts.

bhyve(8) VM exit handlers now treat 'vmexit->rip' and 'vmexit->inst_length'
as readonly:
- Restarting an instruction is now done by calling 'vm_restart_instruction()'
  as opposed to setting 'vmexit->inst_length' to 0 (e.g. emulate_inout())
- Resuming vcpu at an arbitrary %rip is now done by setting VM_REG_GUEST_RIP
  as opposed to changing 'vmexit->rip' (e.g. vmexit_task_switch())

Differential Revision:	https://reviews.freebsd.org/D1526
Reviewed by:		grehan
MFC after:		2 weeks
2015-01-18 03:08:30 +00:00
Neel Natu
1bd468a4e9 Make the error message explicit instead of just printing the usage if the
virtual machine name is not specified.

Requested by:	grehan
MFC after:	1 week
2015-01-18 01:50:10 +00:00
Bjoern A. Zeeb
a9c42ce4b9 There are still kernel configs and mk files depending on the OFED option.
This will need a proper cleanup and in the meantime after r277302 unbreak
LINT builds.
2015-01-18 01:28:08 +00:00
Ian Lepore
bba987dc50 Add a new SDHCI quirk, SDHCI_QUIRK_DONT_SET_HISPD_BIT. Apparently some
sdhci controllers, such as the one on a Raspberry Pi, mishandle the signal
timing in high speed signaling mode, but run just fine in standard mode
with the bus running at frequencies between 25-50MHz (which shouldn't work).

This is the solution adopted by U-Boot and other OSes (linux and *BSD)
for the timeouts on Raspberry Pi boards with certain SD cards.  Some
research shows that this quirk is also used on a few other boards, so the
fix is a generic quirk instead of being in the RPi-specific driver code.

This change is based on information discovered by Michal Meloun.
2015-01-17 19:57:03 +00:00
Ian Lepore
cf5bb7ca1c Add defines for SDHCI 3.0 controllers.
Submitted by:	Michal Meloun <meloun@miracle.cz>
2015-01-17 18:56:22 +00:00
Ian Lepore
d6f695fd31 Minor cleanups, comment changes. No need to load 3 values when setting up
the stack for secondary cores, the other two values are only used for zeroing
bss on the primary core.  No need to store the size of the stack at the
top of the stack (seems to be a leftover instruction from some cut-n-paste).
2015-01-17 18:40:46 +00:00
Adrian Chadd
f590185223 Correct the descriptor length for AR9462/AR9565 and set the final field
to zero - TX drops are otherwise reported.

Tested:

* AR9462 (WB222), STA mode

Obtained from:	Linux ath9k
2015-01-17 17:37:08 +00:00
Adrian Chadd
091855cd9e Skip the OFDM weak signal threshold detection programming for
AR9462/AR9565.

This and some upcoming changes to the HAL for these chips should
address some of the signal sensitivity reported by users.

Tested:

* AR9462 (WB222), STA mode

Obtained from:	Linux ath9k
2015-01-17 17:31:47 +00:00
Hans Petter Selasky
e982e5c561 Start importing the basic OFED linux compatibility layer changes made
by dumbbell@ to be able to compile this layer as a dependency module.
Clean up some Makefiles and remove the no longer used OFED define.
Currently only i386 and amd64 targets are supported.

MFC after:		1 month
Sponsored by:		Mellanox Technologies
2015-01-17 16:36:39 +00:00
Pedro F. Giffuni
84b170d298 ext2: cosmetical issues
Minor sorting and note when the cases are expected to fall through.

MFC after:	1 week
2015-01-17 15:19:18 +00:00
Steven Hartland
bc96366c86 Mechanically convert cddl sun #ifdef's to illumos
Since the upstream for cddl code is now illumos not sun, mechanically
convert all sun #ifdef's to illumos #ifdef's which have been used in all
newer code for some time.

Also do a manual pass to correct the use if #ifdef comments as per style(9)
as well as few uses of #if defined(__FreeBSD__) vs #ifndef illumos.

MFC after:	1 month
Sponsored by:	Multiplay
2015-01-17 14:44:59 +00:00
Ruslan Bukin
b0b74fb366 o Notify USB host about connection when operating in device mode.
Required when communicating to Mac OS X USB host stack.
o Also don't set stall bit to TX pipe in device mode as seems Mac OS X
  don't clears it as it should.

Discussed with:	hselasky@
2015-01-17 12:31:26 +00:00
Andrey V. Elsukov
504289ea5a Fix condition and really sort ports. Also add comment describing
the intent of this code.

Reported by:	sbruno
MFC after:	1 week
Sponsored by:	Yandex LLC
2015-01-17 11:32:09 +00:00
Roger Pau Monné
df560e4e96 loader: use correct types for parse_modmetadata
Use the proper types in parse_modmetadata for the p_start and p_end
parameters. This was causing problems in the ARM 32bit loader.

Sponsored by: Citrix Systems R&D
Reported and Tested by: ian
2015-01-17 08:09:07 +00:00
Adrian Chadd
30696562d3 Oops; correctly reload the CCA registers with the uncapped value
in prep for the next NF calibration pass.

Totally missing braces.  Damn you C.

Submitted by:	Sascha Wildner <swildner@dragonflybsd.org>
MFC after:	1 week
2015-01-17 07:33:02 +00:00
Nathan Whitehorn
d2d3e9b818 Return an appropriate error code in the case of a missing property rather
than random numbers.

MFC after:	1 week
2015-01-17 07:01:51 +00:00
Adrian Chadd
e5acc52d45 Override the bt enable/disable methods for AR9462 (jupiter) and
AR9565 (Aphrodite.)  These need to use the MCI routines, not
the legacy 2-wire / 3-wire bluetooth coexistence methods.

Tested:

* AR9462 (WB222); STA mode
2015-01-17 06:43:30 +00:00
Warner Losh
8e9b1703f7 Need to include opt_mca.h to test for DEV_MCA. 2015-01-17 02:17:59 +00:00
Warner Losh
beae9392aa Move DEV_ entries scattered to their common section. Add DEV_PCI. 2015-01-17 02:17:57 +00:00
Warner Losh
eac107b8db The sn driver isn't UCODE sourceless. While it is true there's an
binary FPGA image that's in an include file in this directory, that
include file isn't actually used. It is only for certain Trump Cards
that we don't yet support. When support was anticipated for them, we
got permission to include the required FPGA image in our sources under
the BSDL, but didn't start actually including the file. This was done
to provide a public paper trail for this file.
2015-01-17 02:17:55 +00:00
Enji Cooper
0c76184ced Fix lib/libthr/tests/detach_test
- Eliminate race with liberal use of sleep(3) [1]
- Fix NetBSD-specific implementation way of testing result from pthread_cancel
  by testing with `td` instead of `NULL` [2]

PR: 196738 [1]
PR: 191906 [2]

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2015-01-17 00:58:24 +00:00
Adrian Chadd
e21928d3c3 Until there's a full MCI implementation - just implement a placeholder
MCI bluetooth coexistence method for WB222.

The rest of MCI requires a bunch more work, including adding a DMA buffer
for the MCI hardware to bounce messages in/out of and handling MCI
interrupts.  But the more important part here is telling the HAL
the btcoex is enabled and MCI is in use so it configures the correct
initial bluetooth parameters in the wireless NIC and configures
things like bluetooth traffic weights and such.

So, this at least gets the HAL to do some of the right things in
configuring the inital bluetooth coexistence stuff, but doesn't
actually do full btcoex.  That'll take.. some effort.

Tested:

* AR9462 (WB222), STA mode
2015-01-17 00:02:18 +00:00
Adrian Chadd
38878c6343 Tie in the MCI bluetooth coexistence functions into the HAL.
Tested:

* AR9462 (WB222)
2015-01-16 23:48:28 +00:00
Adrian Chadd
335b1a6beb Add bluetooth MCI coexistence HAL methods - used for AR9462 and AR9565 NICs.
It's found, amongst other things, in the Acer Chromebook (Intel)
devices.

Tested:

* AR9462 (WB222)

Obtained from:	Qualcomm Atheros
2015-01-16 23:47:42 +00:00
Jung-uk Kim
325180bf29 Update buildinf.h to make SSLeay_version(3) little bit more useful.
MFC after:	1 week
2015-01-16 22:11:02 +00:00
Will Andrews
7a37b5fc17 Add a ${CP} alias for copying files in the build.
Some users build FreeBSD as non-root in Perforce workspaces.  By default,
Perforce sets files read-only unless they're explicitly being edited.
As a result, the -f argument must be used to cp in order to override the
read-only flag when copying source files to object directories.  Bare use of
'cp' should be avoided in the future.

Update all current users of 'cp' in the src tree.

Reviewed by:	emaste
MFC after:	1 week
Sponsored by:	Spectra Logic
2015-01-16 21:39:08 +00:00
Enji Cooper
5962fd53ac Don't call abort on usage errors; print out the usage message instead
PR: 196793
MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division
2015-01-16 21:12:36 +00:00
Glen Barber
e3c3ea1cee Document r277270, OpenSSL update to 1.0.1l.
Sponsored by:	The FreeBSD Foundation
2015-01-16 21:08:04 +00:00
Jung-uk Kim
dc2b908f54 Merge OpenSSL 1.0.1l.
MFC after:	1 week
Relnotes:	yes
2015-01-16 21:03:23 +00:00
Jung-uk Kim
8f5086671f Import OpenSSL 1.0.1l. 2015-01-16 19:52:36 +00:00
Ian Lepore
97665af981 Enable the snoop control unit during MP startup, rather than relying on
the bootloader to have done so.

Submitted by:	Thomas Skibo <thomasskibo@sbcglobal.net>
2015-01-16 19:49:10 +00:00
Glen Barber
5f87b8f5f9 Add initial support for the GCE (Google Compute Engine)
cloud hosting provider image.

Many thanks to swills@ for his work on getting this to
this point.

Submitted by:	swills
Sponsored by:	The FreeBSD Foundation
2015-01-16 19:27:19 +00:00
Jack F Vogel
dcd7b3b269 Some RSS issues discovered by Adrian, missing header, variable
names fat fingered, incorrect hash config setup. Thanks :)

MFC after: 1 week
2015-01-16 19:11:58 +00:00
Ed Maste
b15dc00338 crunchide: Correct 64-bit section header offset
For 64-bit binaries the Elf_Ehdr e_shoff is at offset 40, not 44.
Instead of using an incorrect hardcoded offset, let the compiler
figure it out for us with offsetof().

Differential Revision:	https://reviews.freebsd.org/D1543
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2015-01-16 18:59:15 +00:00
Gleb Smirnoff
61b6fd5ab2 Plug mutex leak.
MFC after:	1 week
Sponsored by:	Nginx, Inc.
2015-01-16 18:51:26 +00:00
Nathan Whitehorn
c884d31122 Add two fake properties ("fdtbootcpu" and "fdtmemreserv") to the device
tree's /chosen node to provide out-of-band header fields of the FDT. This
emulation is not perfect without corresponding changes to ofw_fdt_nextprop(),
but is enough to enable lookup by memory-map-parsing code.

MFC after:	1 week
2015-01-16 18:47:20 +00:00
Nathan Whitehorn
622d02fb21 Instead of iterating through all properties looking for a match, if asked
for a specific property, look it up directly.

MFC after:	1 week
2015-01-16 18:42:49 +00:00
Alan Cox
5268042bbd Revamp the default page clustering strategy that is used by the page fault
handler.  For roughly twenty years, the page fault handler has used the
same basic strategy: Fetch a fixed number of non-resident pages both ahead
and behind the virtual page that was faulted on.  Over the years,
alternative strategies have been implemented for optimizing the handling
of random and sequential access patterns, but the only change to the
default strategy has been to increase the number of pages read ahead to 7
and behind to 8.

The problem with the default page clustering strategy becomes apparent
when you look at how it behaves on the code section of an executable or
shared library.  (To simplify the following explanation, I'm going to
ignore the read that is performed to obtain the header and assume that no
pages are resident at the start of execution.)  Suppose that we have a
code section consisting of 32 pages.  Further, suppose that we access
pages 4, 28, and 16 in that order.  Under the default page clustering
strategy, we page fault three times and perform three I/O operations,
because the first and second page faults only read a truncated cluster of
12 pages.  In contrast, if we access pages 8, 24, and 16 in that order, we
only fault twice and perform two I/O operations, because the first and
second page faults read a full cluster of 16 pages.  In general, truncated
clusters are more common than full clusters.

To address this problem, this revision changes the default page clustering
strategy to align the start of the cluster to a page offset within the vm
object that is a multiple of the cluster size.  This results in many fewer
truncated clusters.  Returning to our example, if we now access pages 4,
28, and 16 in that order, the cluster that is read to satisfy the page
fault on page 28 will now include page 16.  So, the access to page 16 will
no longer page fault and perform an I/O operation.

Since the revised default page clustering strategy is typically reading
more pages at a time, we are likely to read a few more pages that are
never accessed.  However, for the various programs that we looked at,
including clang, emacs, firefox, and openjdk, the reduction in the number
of page faults and I/O operations far outweighed the increase in the
number of pages that are never accessed.  Moreover, the extra resident
pages allowed for many more superpage mappings.  For example, if we look
at the execution of clang during a buildworld, the number of (hard) page
faults on the code section drops by 26%, the number of superpage mappings
increases by about 29,000, but the number of never accessed pages only
increases from 30.38% to 33.66%.  Finally, this leads to a small but
measureable reduction in execution time.

In collaboration with:	Emily Pettigrew <ejp1@rice.edu>
Differential Revision:	https://reviews.freebsd.org/D1500
Reviewed by:	jhb, kib
MFC after:	6 weeks
2015-01-16 18:17:09 +00:00
Nathan Whitehorn
348a26e6c7 Make netbooting work again by disabling BOOTP_NFSV3. Investigate why this
causes bad RPC errors later.
2015-01-16 17:41:21 +00:00
Glen Barber
85311c29b0 Add 'list-vmtargets' target, which produces a list of
all supported VM and cloud provider images.

Add VHD_DESC, VMDK_DESC, QCOW2_DESC, RAW_DESC image
descriptions.

Format the output to make a bit more readable.

Update release(7) to document the list-vmtargets target.

Sponsored by:	The FreeBSD Foundation
2015-01-16 17:40:30 +00:00
Glen Barber
b513fff0b2 Update release(7):
- Add a "CLOUD HOSTING MACHINE IMAGES" section,
   documenting the CLOUDWARE and WITH_CLOUDWARE
   make(1) environment variables.

 - Document the vm-cloudware and list-cloudware
   targets.

 - Add release/Makefile.vm, release/tools/*.conf
   and release/tools/vmimage.subr to FILES.

Sponsored by:	The FreeBSD Foundation
2015-01-16 17:07:35 +00:00
Glen Barber
99e908c904 Add a 'list-cloudware' target to print the list of
supported CLOUDWARE values and a description.

Add the AZURE_DESC and OPENSTACK_DESC descriptions.

Sponsored by:	The FreeBSD Foundation
2015-01-16 17:05:35 +00:00
Glen Barber
0cdabd97fb Remove vm_extra_install_base() for the Azure image, now
that the waagent exists in the ports tree.

Add sysutils/azure-agent to the VM_EXTRA_PACKAGES list.

In vm_extra_pre_umount(), remove the explicit pkg(8) install
list, as dependencies are resolved by sysutils/azure-agent.

Sponsored by:	The FreeBSD Foundation
2015-01-16 15:37:07 +00:00
Ed Maste
8ae6c16d82 Verify that section header offset is not past EOF
MFC After:	1 week
Sponsored by:	The FreeBSD Foundation
2015-01-16 15:16:19 +00:00
Alexander Motin
1b922b707e Don't count status as sent until CTIO completes successfully.
If we aggregated status sending with data move and got error, allow status
to be updated and resent again separately.  Without this command may stuck
without status sent at all.

MFC after:	2 weeks
2015-01-16 12:35:55 +00:00
Hans Petter Selasky
c8563d530c Add more USB device IDs.
Submitted by:	max.n.boyarov@gmail.com
PR:		196362
MFC after:	1 week
2015-01-16 12:16:21 +00:00
Hans Petter Selasky
8778569724 Add more USB request definitions. The values are described in section
9.4.11 and 9.4.12 of the "Universal Serial Bus 3.0 Specification"

Submitted by:	Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after:	1 week
2015-01-16 12:11:01 +00:00