Commit Graph

96775 Commits

Author SHA1 Message Date
Alexander Motin
718724fd0d Fix I/O freezes in some cases, caused by r257916.
Delaying isp_reqodx update, we should be ready to update it every time
we read it.  Otherwise requests using several indexes may be requeued
ndefinitely without ever updating the variable.

MFC after:	3 days
2014-02-05 16:22:02 +00:00
Nathan Whitehorn
65d08437ef Move Open Firmware device root on PowerPC, ARM, and MIPS systems to
a sub-node of nexus (ofwbus) rather than direct attach under nexus. This
fixes FDT on x86 and will make coexistence with ACPI on ARM systems easier.
SPARC is unchanged.

Reviewed by:	imp, ian
2014-02-05 14:44:22 +00:00
Hans Petter Selasky
42cb359e6e Use system macro instead of own hand-rolled one. 2014-02-05 08:29:24 +00:00
Hans Petter Selasky
6b97b1b3fe Add more quirks for making builtin audio speakers work with more
MacBookPro's. Only tested with MacBookPro 9,2.

Obtained from:	Linux
MFC after:	1 week
2014-02-05 08:27:02 +00:00
Kevin Lo
c1033bd401 Correct setting R92C_TXAGC_MCS11_MCS08 register. 2014-02-05 08:09:02 +00:00
Hans Petter Selasky
5fb878a957 Fix a regression issue. Contiguous single segment allocations above
PAGE_SIZE bytes should only use one USB page structure. Fixes a
problem with some external drivers.

MFC after:	2 days
2014-02-05 08:02:52 +00:00
John Baldwin
00f3efe1bd Add support for FreeBSD/i386 guests under bhyve.
- Similar to the hack for bootinfo32.c in userboot, define
  _MACHINE_ELF_WANT_32BIT in the load_elf32 file handlers in userboot.
  This allows userboot to load 32-bit kernels and modules.
- Copy the SMAP generation code out of bootinfo64.c and into its own
  file so it can be shared with bootinfo32.c to pass an SMAP to the i386
  kernel.
- Use uint32_t instead of u_long when aligning module metadata in
  bootinfo32.c in userboot, as otherwise the metadata used 64-bit
  alignment which corrupted the layout.
- Populate the basemem and extmem members of the bootinfo struct passed
  to 32-bit kernels.
- Fix the 32-bit stack in userboot to start at the top of the stack
  instead of the bottom so that there is room to grow before the
  kernel switches to its own stack.
- Push a fake return address onto the 32-bit stack in addition to the
  arguments normally passed to exec() in the loader.  This return
  address is needed to convince recover_bootinfo() in the 32-bit
  locore code that it is being invoked from a "new" boot block.
- Add a routine to libvmmapi to setup a 32-bit flat mode register state
  including a GDT and TSS that is able to start the i386 kernel and
  update bhyveload to use it when booting an i386 kernel.
- Use the guest register state to determine the CPU's current instruction
  mode (32-bit vs 64-bit) and paging mode (flat, 32-bit, PAE, or long
  mode) in the instruction emulation code.  Update the gla2gpa() routine
  used when fetching instructions to handle flat mode, 32-bit paging, and
  PAE paging in addition to long mode paging.  Don't look for a REX
  prefix when the CPU is in 32-bit mode, and use the detected mode to
  enable the existing 32-bit mode code when decoding the mod r/m byte.

Reviewed by:	grehan, neel
MFC after:	1 month
2014-02-05 04:39:03 +00:00
Tycho Nightingale
54e03e07b3 Add support for emulating the byte move and zero extend instructions:
"mov r/m8, r32" and "mov r/m8, r64".

Approved by:	neel (co-mentor)
2014-02-05 02:01:08 +00:00
Robert Millan
4139f4a0c1 Abort when firmware isn't present in R600+ models.
More details at:
http://anonscm.debian.org/viewvc/kernel/dists/trunk/linux/debian/patches/bugfix/all/radeon-firmware-is-required-for-drm-and-kms-on-r600-onward.patch?revision=20909&view=co

Reviewed by:	dumbbell
MFC after:	1 week
2014-02-04 21:23:12 +00:00
Ed Schouten
35a3f5a1b9 Use right buffer to print to.
PR:		kern/176597
Submitted by:	Christoph Mallon <christoph mallon gmx de>
MFC after:	2 weeks
2014-02-04 20:52:33 +00:00
Warner Losh
ab2de2d795 Bump the version of config to the latest (3 year old, so upgrade
worries are long past). Also remove redundant MACHINE= declarations
and passing MACHINE/MACHINE_ARCH to module builds. That's now done in
common code.
2014-02-04 18:24:25 +00:00
Doug Ambrisko
96f9425f06 Add a tunable "hw.mfi.mrsas_enable" to allow mfi(4) to drop priority and
allow mrsas(4) from LSI to attach to newer LSI cards that are support by
mrsas(4).  If mrsas(4) is not loaded into the system at boot then mfi(4)
will always attach.  If a modified mrsas(4) is loaded in the system.  That
modification is return "-30" in it's probe since that is between
BUS_PROBE_DEFAULT and BUS_PROBE_LOW_PRIORITY.

This option is controller by a new probe flag "MFI_FLAGS_MRSAS" in mfi_ident
that denotes cards that should work with mrsas(4).  New entries that should
have this option.

This is the first step to get mrsas(4) checked into FreeBSD and to avoid
collision with people that use mrsas(4) from LSI.  Since mfi(4) takes
priority, then mrsas(4) users need to rebuild GENERIC.  Using the
.disabled="1" method doesn't work since that blocks attaching and the
probe gave it to mfi(4).

Discussed with:		LSI (Kashyap Desai)
2014-02-04 17:35:41 +00:00
Warner Losh
ff24815a4a Pass MACHINE and MACHINE_ARCH down into the modules 2014-02-04 05:35:04 +00:00
Warner Losh
5f384f7c36 Remove trailing tabs causing false grep positives 2014-02-04 05:26:12 +00:00
Warner Losh
664b50e6e5 s/standard/optional/ for ohci and echi, since these files are optional
and not standard.
2014-02-04 05:21:57 +00:00
Warner Losh
37583470b2 Add a prior version compat define. 2014-02-04 03:59:35 +00:00
Neel Natu
953c2c47eb Avoid doing unnecessary nested TLB invalidations.
Prior to this change the cached value of 'pm_eptgen' was tracked per-vcpu
and per-hostcpu. In the degenerate case where 'N' vcpus were sharing
a single hostcpu this could result in 'N - 1' unnecessary TLB invalidations.
Since an 'invept' invalidates mappings for all VPIDs the first 'invept'
is sufficient.

Fix this by moving the 'eptgen[MAXCPU]' array from 'vmxctx' to 'struct vmx'.

If it is known that an 'invept' is going to be done before entering the
guest then it is safe to skip the 'invvpid'. The stat VPU_INVVPID_SAVED
counts the number of 'invvpid' invalidations that were avoided because
they were subsumed by an 'invept'.

Discussed with:	grehan
2014-02-04 02:45:08 +00:00
Alexander Motin
b4fced900b Fix lock acquisition in case no request space available, missed in r260097.
MFC after:	3 days
2014-02-04 00:00:01 +00:00
Luiz Otavio O Souza
f0d701f048 Fix a logic error. Because of this inflateReset() wasn't being called and
the output buffer wasn't being cleared between the inflate() calls,
producing zeroed output after the first inflate() call.

This fixes the read of mkuzip(8) images with geom_uncompress(4).

Reviewed by:	ray
Approved by:	adrian (mentor)
2014-02-03 17:25:36 +00:00
Luiz Otavio O Souza
c2d90f35d5 Remove some unnecessary code. The offsets read from the first block are
overwritten a few lines bellow.

Reviewed by:	ray
Approved by:	adrian (mentor)
2014-02-03 17:21:36 +00:00
Rui Paulo
1f88f8a384 Fix the definition of hg_cmd.
MFC after:	3 days
2014-02-03 08:15:09 +00:00
Ian Lepore
bcbcc48fbf Sort the list. 2014-02-03 02:56:23 +00:00
Ian Lepore
e347507d5f Add the imx sdhci controller. 2014-02-03 02:52:07 +00:00
Justin Hibbits
c017acc769 Add driver for the ADT7460/ADT7467 fan controller found in later PowerBooks
and iBooks.  Original work by andreast.

MFC after:	1 month
2014-02-03 01:22:50 +00:00
Justin Hibbits
5464324ac6 Add missing file to Makefile.
MFC after:	1 month
X-MFC-with:	261342
2014-02-03 01:16:32 +00:00
Olivier Houchard
d5e7c3b7af Only use the CPU ID register if SMP is defined. Some non-MPCore armv6 cpu,
such as the one found in the RPi, don't have it, and just hang when we try
to access it.
2014-02-02 23:29:51 +00:00
Olivier Houchard
2dfc0cd1b1 Invalidate cachelines for bounce pages on PREREAD too, there may still be
stale entries from a previous transfer.
2014-02-02 22:26:30 +00:00
Ian Lepore
af727bf0d3 Add missing semicolon. 2014-02-02 21:44:04 +00:00
Ruslan Bukin
8c7da46079 o Add prototype for tcon_bypass() used by dcu4
o Add register definition
2014-02-02 21:10:40 +00:00
Olivier Houchard
646b940455 Change the way pcpu and curthread are stored per-core:
the old way was to store pcpu in a register, and get curthread from pcpu,
which is not very atomic, and led to issues if the thread was migrated
to another core between the time we got the pcpu address and the time we
got curthread.
Instead, we now store curthread where pcpu used to be store, and we
calculate the pcpu address based on the cpu id.
2014-02-02 20:58:23 +00:00
Olivier Houchard
006a01df2c Don't call device_set_ivars() for the mmchs, it doesn't seem to be used,
and it overrides the ivars set by the simplebus.
2014-02-02 20:45:41 +00:00
Ruslan Bukin
bb8bc226d3 Add driver for Display Control Unit (DCU4). 2014-02-02 20:25:27 +00:00
Alan Cox
63281952f0 Make prefaulting more aggressive on hard faults. Previously, we would only
map a fraction of the pages that were fetched by vm_pager_get_pages() from
secondary storage.  Now, we map them all in order to avoid future soft
faults.  This effect is most evident when a memory-mapped file is accessed
sequentially.  Previously, there were 6 soft faults for every hard fault.
Now, these soft faults are eliminated.

Sponsored by:	EMC / Isilon Storage Division
2014-02-02 20:21:53 +00:00
Ruslan Bukin
b318fc466d Add support for Colibri VF50 Evaluation Board.
Colibri VF50 is a SODIMM200 Vybrid Family core module
and development board produced by Toradex AG.

Sponsored by:	Machdep, Inc.
2014-02-02 19:35:10 +00:00
Ian Lepore
add35ed5b8 Follow r261352 by updating all drivers which are children of simplebus
to check the status property in their probe routines.

Simplebus used to only instantiate its children whose status="okay"
but that was improper behavior, fixed in r261352.  Now that it doesn't
check anymore and probes all its children; the children all have to
do the check because really only the children know how to properly
interpret their status property strings.

Right now all existing drivers only understand "okay" versus something-
that's-not-okay, so they all use the new ofw_bus_status_okay() helper.
2014-02-02 19:17:28 +00:00
Ruslan Bukin
6f34487cc9 Split kernel configuration to chip common and board specific parts. 2014-02-02 19:13:02 +00:00
Ruslan Bukin
bf636ac469 o Expand device tree information
o Export iomuxc (pins) configuration to DTS
o Allow devices to assign clocks in DTS
2014-02-02 17:48:06 +00:00
Ian Lepore
b4122742a6 Be more robust with malformed interrupt config data. Instead of crashing
or going into a near-infinite loop, warn and make potentially-reasonable
assumptions.
2014-02-02 16:56:40 +00:00
Nathan Whitehorn
52567c06be Fix one remnant endian flaw here. The back-and-forth endian conversions are
confusing.
2014-02-02 16:42:26 +00:00
Nathan Whitehorn
e4be5a1636 Add a set of helpers (ofw_bus_get_status() and ofw_bus_status_okay()) to
process "status" properties of OF nodes.

I've avoided adding new KOBJ methods here so that we don't have to modify
every ofw_bus in the tree. Since 100% of implementations of ofw_bus use
only ofw_bus_gen_*(), it might be worth garbage-collecting the other
methods as well.
2014-02-02 16:41:54 +00:00
Andrey V. Elsukov
51eecdc35a Take exclusive lock only when lle isn't NULL. We don't need write access
to lle in most cases.

MFC after:	1 week
Sponsored by:	Yandex LLC
2014-02-02 07:28:04 +00:00
Nathan Whitehorn
f18ac51a90 Fix missing offset. 2014-02-02 05:52:34 +00:00
Nathan Whitehorn
2b5bab93fb Allow nesting of simplebuses. 2014-02-02 05:41:12 +00:00
Nathan Whitehorn
4a5e35f650 Fix typo. Sorry for breakage! 2014-02-02 05:21:12 +00:00
Bryan Venteicher
54fb8142b6 Use m_defrag() instead of m_collapse() to compact a long mbuf chain
This should be an infrequent occurrence, so remove the per-queue
counters in favor of just global counters in the softc.
2014-02-02 05:20:46 +00:00
Bryan Venteicher
443c3d0bd1 Do not place the sglist used for Rx/Tx on the stack
The sglist segment array has grown to a bit over 512 bytes (on
64-bit system) which is more than ideally should be put on the
stack. Instead allocate an appropriately sized sglist and hang
it off each Rx/Tx queue structure.

Bump the maximum number of Tx segments to 64 to make it unlikely
we'll have defragment an mbuf chain. Our previous count was
rounded up to this value since it is the next power of two, so
effective memory usage should not change.

Also only allocate the maximum number of Tx segments if TSO was
negotiated.
2014-02-02 05:15:36 +00:00
Ian Lepore
37211e7bcd Update all arm code that manipulates the PSR registers to use modern syntax.
It turns out the version of gas we're using interprets the old '_all' mask
as 'fc' instead of 'fsxc'.  That is, "all" doesn't really mean "all".

This was the cause of the "wrong-endian register restore" bug that's
been causing problems with some cortex-a9 chips.  The 'endian' bit in the
spsr register would never get changed (it falls into the 'x' mask group)
and the first return-from-exception would fail if the chip had powered on
with garbage in the spsr register that included the big-endian bit.  It's
unknown why this affected only certain cortex-a9 chips.
2014-02-02 00:48:15 +00:00
Nathan Whitehorn
8279efe54e Switch default Book-E scheduler to ULE, which works now, and enable
CAPABILITIES stuff required to make ssh work.

Hopefully, Book-E can eventually be added to GENERIC, which would avoid
this kind of issue with bitrot. That will require figuring out how to link
Book-E and AIM kernels at the same address, however...
2014-02-01 20:56:50 +00:00
Nathan Whitehorn
a8a9b1c250 ULE works on Book-E since r258002, so remove statements to the contrary. 2014-02-01 20:46:35 +00:00
Nathan Whitehorn
a3845e4242 Avoid spurious compiler warning about an uninitialized variable. 2014-02-01 20:06:52 +00:00