Commit Graph

87725 Commits

Author SHA1 Message Date
Adrian Chadd
b193c0b591 Add a missing comma.
Pointy hat to: me, for not doing a 'clean' build first.
2012-08-15 07:50:42 +00:00
Adrian Chadd
b36437c83b Add 3 stream rates to the sample rate control module. 2012-08-15 07:32:34 +00:00
Adrian Chadd
193bfa21ea Extend the sample mask from 32 bits to 64 bits.
This is required to support > MCS15 as more than 32 bit rate entries are
suddenly available.

This is quite messy - instead of doing typecasts at each mask operation,
this should be migrated to use a macro and have that do the typecast.
2012-08-15 07:10:10 +00:00
Oleksandr Tymoshenko
d3b496875a Specify architecture for assembler 2012-08-15 07:00:34 +00:00
Adrian Chadd
85bf9bc3d5 Implement a sequential descriptor ID value and stuff it in the ath_buf.
This will be used by the EDMA TX code to assign descriptor IDs in order
to provide some debugging.
2012-08-15 06:48:34 +00:00
Oleksandr Tymoshenko
e53470fee3 Merging of projects/armv6, part 10
- Support for Texas Instruments SoCs:
	- AM335x
	- OMAP4

- Kernel configs, DTS for Beaglebone and Pandaboard

Submitted by:	Ben Gray, Damjan Marion
2012-08-15 06:31:32 +00:00
Oleksandr Tymoshenko
9dfe4a1fa4 Merging of projects/armv6, part 9
Very basic support for Nvidia Tegra2: timer, interrupts, UART.

Submitted by:	Damjan Marion <dmarion@freebsd.org>
2012-08-15 06:06:43 +00:00
Oleksandr Tymoshenko
7a8988194d Merging of projects/armv6, intermission
Add configs missed in previous commits:
    - ARMADA XP
	- Embedded Artists EA3250
2012-08-15 05:55:16 +00:00
Oleksandr Tymoshenko
8dee0fd04c Merging of projects/armv6, part 8
r235162:

  Initial LPC32x0 support. Includes DTS file for Embedded Artists EA3250
  board.

  Peripherals currently supported:
  - Serial ports
  - Interrupt controller
  - Timers
  - Ethernet
  - USB host
  - Framebuffer (in conjunction with SSD1289 LCD controller)
  - RTC
  - SPI
  - GPIO

Submitted by:	Jakub Wojciech Klama <jceel@freebsd.org>
2012-08-15 05:37:10 +00:00
Oleksandr Tymoshenko
16694521fe Merging of projects/armv6, part 7
Add Marvell ARMADA XP support

Obtained from:	Marvell, Semihalf
2012-08-15 05:15:49 +00:00
Oleksandr Tymoshenko
75f1438be6 Merging of projects/armv6, part 6
r229271:
    Import files needed to build ARMADA XP kernel.

Submitted by:	Grzegorz Bernacki
2012-08-15 04:07:18 +00:00
Oleksandr Tymoshenko
b011f8c450 Merging of projects/armv6, part 5
- Driver for SMSC LAN95XX and LAN8710A ethernet controllers
- Driver for LAN8710A PHY

Submitted by:	Ben Gray, Damjan Marion, Tim Kientzle
2012-08-15 04:03:55 +00:00
Oleksandr Tymoshenko
8bb9363760 Merging of projects/armv6, part 4
r233822:
  Remove useless and wrong piece of code in fdt_get_range() which i
  overwrites passed phandle_t node. Modify debug printf in fdt_reg_to_rl()
  to be consistent (that is, print start and end *virtual* addresses).

r230560:
  Handle "ranges;"
  Make fdt_reg_to_rl() responsible for mapping the device memory, instead
  on just hoping that there's only one simplebus, and using fdt_immr_va as
  the base VA.

r230315
  Add a function to get the PA from range, instead of (ab)using
  fdt_immr_pa, and use it for the UART driver
2012-08-15 03:49:10 +00:00
Oleksandr Tymoshenko
3c92de458b Merging of projects/armv6, part 4
r232281:
Fix byte order.
2012-08-15 03:33:57 +00:00
Oleksandr Tymoshenko
4da573d910 Merging of projects/armv6, part 3
r238211:
Support TARGET_ARCH=armv6 and TARGET_ARCH=armv6eb

This adds a new TARGET_ARCH for building on ARM
processors that support the ARMv6K multiprocessor
extensions.  In particular, these processors have
better support for TLS and mutex operations.

This mostly touches a lot of Makefiles to extend
existing patterns for inferring CPUARCH from ARCH.
It also configures:
 * GCC to default to arm1176jz-s
 * GCC to predefine __FreeBSD_ARCH_armv6__
 * gas to default to ARM_ARCH_V6K
 * uname -p to return 'armv6'
 * make so that MACHINE_ARCH defaults to 'armv6'
It also changes a number of headers to use
the compiler __ARM_ARCH_XXX__ macros to configure
processor-specific support routines.

Submitted by:	Tim Kientzle <kientzle@freebsd.org>
2012-08-15 03:21:56 +00:00
Oleksandr Tymoshenko
cf1a573f04 Merging projects/armv6, part 1
Cummulative patch of changes that are not vendor-specific:
	- ARMv6 and ARMv7 architecture support
	- ARM SMP support
	- VFP/Neon support
	- ARM Generic Interrupt Controller driver
	- Simplification of startup code for all platforms
2012-08-15 03:03:03 +00:00
Navdeep Parhar
8340ece577 The size of the buffers in an Ethernet freelist has to be higher than the
interface's MTU.  Initialize such freelists with correct values.

This wasn't a problem for common MTUs (1500 and 9000) as the buffers (2048
and 9216 in size) happened to have enough spare room.  I ran into it when
playing around with unusual MTUs.

MFC after:	2 weeks
2012-08-15 01:03:13 +00:00
Navdeep Parhar
ae11e5c996 Assume INET, INET6, and TCP_OFFLOAD when the driver is built out of tree and
KERNBUILDDIR is not set.

MFC after:	2 weeks
2012-08-14 23:08:49 +00:00
Adrian Chadd
edd3e98f13 Dump out the TX FIFO depth. 2012-08-14 22:34:22 +00:00
Adrian Chadd
bad98824c0 Break out the TX completion code into a separate function, so it can be
re-used by the upcoming EDMA TX completion code.

Make ath_stoptxdma() public, again so the EDMA TX code can use it.

Don't check for the TXQ bitmap in the ISR when doing EDMA work as it
doesn't apply for EDMA.
2012-08-14 22:32:20 +00:00
Adrian Chadd
e5661062ee Add an assertion to check that the given TXQ is _not_ locked. 2012-08-14 22:30:17 +00:00
Gavin Atkinson
c64253a898 Rename command defines to match names used in the datasheet, in order to
make maintaining this driver from the documentation easier in the future.
This is a mostly mechanical change.

In uslcom_param(), move the zeroing of the final two fields of the
flowctrl structure outside of the "if CRTSCTS" section - not only were
they being zeroed in both the clauses, but these two fields have nothing
to do with hardware flow control anyway.
2012-08-14 22:21:46 +00:00
Navdeep Parhar
2951cbabf0 if_iqdrops should include frames truncated within the chip.
MFC after:	2 weeks
2012-08-14 22:15:12 +00:00
Navdeep Parhar
9fb8886b29 Convert some fixed parameters to tunables (with reasonable default
values).

- cong_drop specifies what to do on congestion: nothing, backpressure,
  or drop.
- fl_pktshift specifies the padding before Ethernet payload.
- fl_pad specifies the boundary upto which to pad Ethernet payload.
- spg_len controls the length of the status page.

MFC after:	2 weeks
2012-08-14 21:47:41 +00:00
Jaakko Heinonen
2f0ac2593b Reserve room for the terminating NUL when setting or getting kernel
environment variables. KENV_MNAMELEN and KENV_MVALLEN doesn't include
space for the terminating NUL.
2012-08-14 19:16:30 +00:00
Dag-Erling Smørgrav
e2082935f0 As discussed on -current, remove the hardcoded default maxswzone.
MFC after:	3 weeks
2012-08-14 17:01:21 +00:00
Alexander Motin
8684fef07d Fix multichannel input signals tracing on some CODECs like ALC260.
Reported and tested by:	Slawa Olhovchenkov <slw@zxy.spb.ru>
MFC after:	1 month
2012-08-14 14:07:34 +00:00
Konstantin Belousov
b6d3609050 Add a hackish debugging facility to provide a bit of information about
reason for generated trap. The dump of basic signal information and 8
bytes of the faulting instruction are printed on the controlling
terminal of the process, if the machdep.uprintf_signal syscal is
enabled.

The print is the only practical way to debug traps from a.out
processes I am aware of. Because I have to reimplement it each time I
debug an issue with a.out support on amd64, commit the hack to main
tree.

MFC after:	1 week
2012-08-14 12:15:01 +00:00
Konstantin Belousov
95fd15898b Real hardware, as opposed to QEMU, does not allow to have a call gate
in long mode which transfers control to 32bit code segment. Unbreak
the lcall $7,$0 implementation on amd64 by putting the 64bit user code
segment' selector into call gate, and execute the 64bit trampoline
which converts the return frame into 32bit format and switches back to
32bit mode for executing int $0x80 trampoline.

Note that all jumps over the hoops are performed in the user mode.

MFC after:	1 week
2012-08-14 12:13:27 +00:00
Konstantin Belousov
ee4116b8f7 For old mmap syscall, when executing on amd64 or ia64, enforce the
PROT_EXEC if prot is non-zero, process is 32bit and
kern.elf32.i386_read_exec syscal is enabled. This workaround is needed
for old i386 a.out binaries, where dynamic linker did not specified
PROT_EXEC for mapping of the text.

The kern.elf32.i386_read_exec MIB name looks weird for a.out binaries,
but I reused the existing knob which already has the needed semantic.

MFC after:	1 week
2012-08-14 12:11:48 +00:00
Konstantin Belousov
a8d4becf02 Regenerate. 2012-08-14 12:09:36 +00:00
Konstantin Belousov
f90fabce5a Implement the old mmap syscall for compat32, when COMPAT_43 option is
enabled. The syscall is used by FreeBSD 1.1.5.1 dynamic linker.

MFC after:	1 week
2012-08-14 12:09:09 +00:00
Konstantin Belousov
7707ccabfb Adjust the r205536, by allowing a non-zero offset for anonymous
mappings for a.out binaries. Apparently, a.out ld.so from FreeBSD
1.1.5.1 can issue such requests.

Reported and tested by:	Dan Plassche <dplassche@gmail.com>
MFC after:	1 week
2012-08-14 11:47:07 +00:00
Konstantin Belousov
b6c00483e9 Do not leave invalid pages in the object after the short read for a
network file systems (not only NFS proper). Short reads cause pages
other then the requested one, which were not filled by read response,
to stay invalid.

Change the vm_page_readahead_finish() interface to not take the error
code, but instead to make a decision to free or to (de)activate the
page only by its validity. As result, not requested invalid pages are
freed even if the read RPC indicated success.

Noted and reviewed by:	alc
MFC after:	1 week
2012-08-14 11:45:47 +00:00
Andreas Tobler
6e8fcacda4 Fix typo in comment. 2012-08-14 05:16:35 +00:00
John Baldwin
06e8730c59 Add locking to the twe(4) driver and make it MPSAFE:
- Add per-controller configuration (sx) and I/O (mutex) locks.  The
  configuration lock protects the relationship of volumes and drives
  while the I/O lock protects access to the controller's registers and
  the main I/O path.
- Remove some checks for M_WAITOK malloc()'s failing.
- Remove the explicit bus space tag/handle from the softc and use
  bus_*() rather than bus_space_*().
- Reuse the existing new-bus sysctl context instead of creating a
  new one.
- Remove compat shims for FreeBSD 4.x.
- Use pci_enable_busmaster() rather than doing it by hand, and rely
  on bus_alloc_resource() to enable PCI I/O decoding.

Tested by:	Mike Tancsa  mike sentex net
Reviewed by:	scottl (partially)
MFC after:	1 month
2012-08-13 21:29:34 +00:00
Dimitry Andric
6cad98e283 After r239066, reinitialize v86.ctl and v86.addr for int 13 EDD probing
in sys/boot/i386/libi386/biosdisk.c.  Otherwise, when DISK_DEBUG is
enabled, the DEBUG() macros will clobber those fields, and cause the
probing to always fail mysteriously when debugging is enabled.
2012-08-13 21:04:01 +00:00
Ed Maste
033ed050a0 Reword comment to try to improve clarity, and fix a typo. 2012-08-13 19:14:45 +00:00
John Baldwin
6e4ac34b07 Remove the deassert INIT IPI from the IPI startup sequence for APs.
It is not listed in the boot sequence in the MP specification (1.4),
and it is explicitly ignored on modern CPUs.  It was only ever required
when bootstrapping systems with external APICs (that is, SMP machines
with 486s), which FreeBSD has never supported (and never will).

While here, tidy some comments and remove some banal ones.
2012-08-13 18:52:51 +00:00
Hans Petter Selasky
f61fc4bd7d Fix for missing locks due to recent change.
PR:		usb/170606
MFC after:	2 weeks
2012-08-13 18:34:04 +00:00
Hans Petter Selasky
e9cec01683 Rename new IOCTL to singular form of the noun "streams".
MFC after:	2 weeks
2012-08-13 18:09:19 +00:00
Hans Petter Selasky
0cb5abc7ca Improve auto-quirks detection for certain Kingston memory sticks.
MFC after:	2 weeks
2012-08-13 18:00:34 +00:00
Alan Cox
f167c4a762 Port the new PV entry allocator from amd64/i386. This allocator has two
advantages.  First, PV entries are roughly half the size.  Second, this
allocator doesn't access the paging queues, and thus it will allow for the
removal of the page queues lock from this pmap.

Fix a rather serious bug in pmap_remove_write().  After removing write
access from the specified page's first mapping, pmap_remove_write() then
used the wrong "next" pointer.  Consequently, the page's second, third,
etc. mappings were not write protected.

Tested by:	jchandra
2012-08-13 17:38:38 +00:00
John Baldwin
a4284ef768 Add a 10 millisecond delay after sending the initial INIT IPI. This
matches the algorithm in the MP specification (1.4).  Previously we
were sending out the deassert INIT IPI immediately after the initial
INIT IPI was sent.
2012-08-13 16:33:22 +00:00
Ed Maste
1221cc675d Use array notation for consistency. 2012-08-13 16:03:30 +00:00
Andrey V. Elsukov
9131425146 Restore the old behaviour. If requested partition is a BSD slice,
but d_partition isn't explicitly set, then try to open BSD label and its
first partition.
2012-08-13 13:33:21 +00:00
Andrey V. Elsukov
baf3d8bfeb Remove colons from the debug message, device name returned by the
disk_fmtdev() already has the colons.
2012-08-13 13:10:50 +00:00
Andrey V. Elsukov
42b577fe76 Unbreak booting from the true dedicated disks.
When we open the disk, check the type of partition table, that has
been detected. If this is BSD label, then we assume this is DD mode.

Reported by:	dim@
2012-08-13 13:08:30 +00:00
Colin Percival
347c7fd7bf Build modules along with the XENHVM kernels.
No objections from:	freebsd-xen mailing list
MFC after:	1 week
2012-08-13 07:36:57 +00:00
Matt Jacob
64f202fc7d Remove extraneous newline.
MFC after:	1 month
2012-08-12 20:49:25 +00:00