]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
11 years agoDisable fsck_ffs for now, 4MB target size issues.
adrian [Wed, 29 Aug 2012 22:54:39 +0000 (22:54 +0000)]
Disable fsck_ffs for now, 4MB target size issues.

11 years agoDisable building textproc for now, it doesn't fit on my 4MB flash
adrian [Wed, 29 Aug 2012 22:54:27 +0000 (22:54 +0000)]
Disable building textproc for now, it doesn't fit on my 4MB flash
partition.

Add -lcrypt as a dynamic target.

11 years agoFor now, disable building wpa_supplicant.
adrian [Wed, 29 Aug 2012 22:53:54 +0000 (22:53 +0000)]
For now, disable building wpa_supplicant.

My 4MB flash builds can't handle the bloat.

11 years agoAvoid passing uninitialized stack to addelem() if called with an empty arg.
emaste [Wed, 29 Aug 2012 21:38:34 +0000 (21:38 +0000)]
Avoid passing uninitialized stack to addelem() if called with an empty arg.

PR: bin/171174

11 years agoAfter r239868, also remove the comment about the workaround for
dim [Wed, 29 Aug 2012 18:58:03 +0000 (18:58 +0000)]
After r239868, also remove the comment about the workaround for
ah_eeprom_9287.c.

11 years agoTeach libdwarf about the DW_FORM_flag_present dwarf attribute, so
dim [Wed, 29 Aug 2012 18:49:41 +0000 (18:49 +0000)]
Teach libdwarf about the DW_FORM_flag_present dwarf attribute, so
programs using libdwarf (such as ctfconvert) don't error out on files
containing the attribute.

MFC after: 2 weeks

11 years agoTeach gdb about the DW_FORM_flag_present dwarf attribute, so it doesn't
dim [Wed, 29 Aug 2012 18:37:10 +0000 (18:37 +0000)]
Teach gdb about the DW_FORM_flag_present dwarf attribute, so it doesn't
error out on files that contain it.  (This attribute can be emitted by
newer versions of clang.)

MFC after: 2 weeks

11 years agoRemove the argument-less .align directive in sys/i386/bios/smapi_bios.S.
dim [Wed, 29 Aug 2012 18:22:52 +0000 (18:22 +0000)]
Remove the argument-less .align directive in sys/i386/bios/smapi_bios.S.
Specifying no argument is undocumented in the gas manual, and clang's
integrated assembler refuses to parse it.  Also, removing it causes no
change at all in the resulting object file.

MFC after: 1 week

11 years agoRemove workaround for the clang 3.2 warning in ah_eeprom_9287.c, since
dim [Wed, 29 Aug 2012 18:14:20 +0000 (18:14 +0000)]
Remove workaround for the clang 3.2 warning in ah_eeprom_9287.c, since
the fix has been applied now.

11 years agoThere's no nede to allocate a DMA map just before calling bus_dmamem_alloc().
adrian [Wed, 29 Aug 2012 16:58:51 +0000 (16:58 +0000)]
There's no nede to allocate a DMA map just before calling bus_dmamem_alloc().

In fact, bus_dmamem_alloc() happily NULLs the dmat pointer passed in,
before replacing it with its own.

This fixes a MIPS crash when kldload'ing if_ath/if_ath_pci -
bus_dmamap_destroy() was passed in a NULL dmat pointer and was doing
all kinds of very bad things.

Reviewed by: scottl

11 years ago- Unlike cache invalidation and TLB demapping IPIs, reading registers from
marius [Wed, 29 Aug 2012 16:56:50 +0000 (16:56 +0000)]
- Unlike cache invalidation and TLB demapping IPIs, reading registers from
  other CPUs doesn't require locking so get rid of it. As the latter is used
  for the timecounter on certain machine models, using a spin lock in this
  case can lead to a deadlock with the upcoming callout(9) rework.
- Merge r134227/r167250 from x86:
  Avoid cross-IPI SMP deadlock by using the smp_ipi_mtx spin lock not only
  for smp_rendezvous_cpus() but also for the MD cache invalidation and TLB
  demapping IPIs.
- Mark some unused function arguments as such.

MFC after: 1 week

11 years agoFix whitespace.
ed [Wed, 29 Aug 2012 16:15:22 +0000 (16:15 +0000)]
Fix whitespace.

11 years agoFix a dead link in sk(4).
issyl0 [Wed, 29 Aug 2012 15:34:31 +0000 (15:34 +0000)]
Fix a dead link in sk(4).

PR: docs/146958
Approved by: gjb (mentor)
MFC after: 3 days

11 years agoChange the gptboot example so the boot partition is aligned on a 4 kB
des [Wed, 29 Aug 2012 15:18:56 +0000 (15:18 +0000)]
Change the gptboot example so the boot partition is aligned on a 4 kB
boundary.

MFC after: 3 days

11 years agoFollow r239818 and remove no more relevant vslock() ENOMEM error.
pluknet [Wed, 29 Aug 2012 13:00:00 +0000 (13:00 +0000)]
Follow r239818 and remove no more relevant vslock() ENOMEM error.

Reviewed by: zont
MFC after: 2 weeks

11 years ago- Don't take an account of locked memory for current process in vslock(9).
zont [Wed, 29 Aug 2012 11:23:59 +0000 (11:23 +0000)]
- Don't take an account of locked memory for current process in vslock(9).

There are two consumers of vslock(9): sysctl code and drm driver.  These
consumers are using locked memory as transient memory, it doesn't belong
to a process's memory.

Suggested by: avg
Reviewed by: alc
Approved by: kib (mentor)
MFC after: 2 weeks

11 years ago4-wire mode isn't working quite right, so turn it off for a bit.
imp [Wed, 29 Aug 2012 06:43:28 +0000 (06:43 +0000)]
4-wire mode isn't working quite right, so turn it off for a bit.

11 years agoMake this work on the AT91SAM9G20:
imp [Wed, 29 Aug 2012 06:42:39 +0000 (06:42 +0000)]
Make this work on the AT91SAM9G20:
o Disable multi-block operations: they sometimes fail.
o Don't use the PROOF bits yet: they hang the system hard.
o Disable the the multi-block operations for !rm9200, but it
  still doesn't help.
o Fix writing < 12 bytes errata to actually work.
o Enable, for the moment, reporting extra bytes soaked up.

11 years agoWhen copying data, use memcpy instead of bcopy. It matches the
imp [Wed, 29 Aug 2012 04:41:25 +0000 (04:41 +0000)]
When copying data, use memcpy instead of bcopy.  It matches the
arguments better.
Also, set the need to use the workaround flag before we actually need
to use it, rather than after.

11 years agoSet the HAL combined antenna diversity capability if the AR9285
adrian [Wed, 29 Aug 2012 04:11:00 +0000 (04:11 +0000)]
Set the HAL combined antenna diversity capability if the AR9285
EEPROM settings allow it.

11 years agoAdd a new capability bit - whether the hardware supports AR9285 style
adrian [Wed, 29 Aug 2012 04:09:54 +0000 (04:09 +0000)]
Add a new capability bit - whether the hardware supports AR9285 style
combined diversity.

11 years agoAdd AR5413 radar parameters and strong signal diversity capability.
adrian [Wed, 29 Aug 2012 03:58:13 +0000 (03:58 +0000)]
Add AR5413 radar parameters and strong signal diversity capability.

This is a re-implementation based on the reference carrier code
for the AR5413.

Tested:
 * Pulse detection for AR5212 and AR5413, to ensure the
   correct behaviour for both chips

PR: kern/170904
Obtained from: Qualcomm Atheros

11 years agoAdd a (temporarily located) definition.
adrian [Wed, 29 Aug 2012 03:50:59 +0000 (03:50 +0000)]
Add a (temporarily located) definition.

11 years agoBring over a configuration for the Atheros AP91 reference board.
adrian [Wed, 29 Aug 2012 01:08:36 +0000 (01:08 +0000)]
Bring over a configuration for the Atheros AP91 reference board.

This has an AR7240 SoC with an AR9285 wireless NIC on-board.

Since the kernel partition on the 4MiB flash is 960KiB, quite a bit
is disabled to try and squeeze the build into that.  Even lzma'ed,
it's still quite large.

11 years agoRemove - not needed.
adrian [Wed, 29 Aug 2012 00:53:58 +0000 (00:53 +0000)]
Remove - not needed.

11 years agoRemove extra debugging - there's no longer any need.
adrian [Wed, 29 Aug 2012 00:53:41 +0000 (00:53 +0000)]
Remove extra debugging - there's no longer any need.

11 years ago* Don't compile in sysctl descriptions
adrian [Tue, 28 Aug 2012 22:50:47 +0000 (22:50 +0000)]
* Don't compile in sysctl descriptions
* random is fine as a module

11 years agoAdd a new flash part - 4MB SPI flash from Winbond.
adrian [Tue, 28 Aug 2012 22:17:22 +0000 (22:17 +0000)]
Add a new flash part - 4MB SPI flash from Winbond.

11 years agoRemove unused SI_* flags.
ed [Tue, 28 Aug 2012 19:30:29 +0000 (19:30 +0000)]
Remove unused SI_* flags.

The SI_DEVOPEN, SI_CONSOPEN and SI_CANDELETE flags are not used by any
piece of code in the tree.

11 years agoRemove unneeded G_PF_CANDELETE flag.
ed [Tue, 28 Aug 2012 19:28:31 +0000 (19:28 +0000)]
Remove unneeded G_PF_CANDELETE flag.

This flag is only used by GEOM so it can be propagated to the character
device's SI_CANDELETE. Unfortunately, SI_CANDELETE seems to do nothing.

11 years agoUse a proper destructor function.
ed [Tue, 28 Aug 2012 18:33:12 +0000 (18:33 +0000)]
Use a proper destructor function.

When calling a revoke(2) on a dtrace device, dtrace_close() could be
called, even if threads are still stuck in the device. Defer the actual
deallocation of datastructures to the cdevpriv destructor.

While there, remove the unneeded D_TRACKCLOSE and D_NEEDMINOR flags. For
the helper device, we never need it. For the regular dtrace devices, we
only need these flags on FreeBSD pre-8.

MFC after: 1 month

11 years agoMake AT91_MCI_ALLOW_OVERCLOCK a real option. Rename old use 30MHz to
imp [Tue, 28 Aug 2012 17:27:46 +0000 (17:27 +0000)]
Make AT91_MCI_ALLOW_OVERCLOCK a real option.  Rename old use 30MHz to
this new option.  Only try to use > 25MHz when our best frequency is <
15MHz and overclocking is enabled. Fix minor style chaff.

11 years agoDon't overwrite the global default CFLAGS when setting include paths.
brooks [Tue, 28 Aug 2012 14:20:41 +0000 (14:20 +0000)]
Don't overwrite the global default CFLAGS when setting include paths.

MFC after: 3 days

11 years agoClip the upper end to 31MHz for slow clock speeds. On faster
imp [Tue, 28 Aug 2012 14:19:10 +0000 (14:19 +0000)]
Clip the upper end to 31MHz for slow clock speeds.  On faster
machines, we wind up with a 66MHz clock, which is too fast.

11 years agoShorten the name of the fast SWI taskqueue to "fast taskq" so that
jhb [Tue, 28 Aug 2012 13:35:37 +0000 (13:35 +0000)]
Shorten the name of the fast SWI taskqueue to "fast taskq" so that
it fits.

Reported by: lev
MFC after: 1 week

11 years agoLink ipfilter(4) and ipfilter(5) to the build to stop the wrong man page
issyl0 [Tue, 28 Aug 2012 12:33:54 +0000 (12:33 +0000)]
Link ipfilter(4) and ipfilter(5) to the build to stop the wrong man page
displaying for 'man 4 ipfilter'.

PR: docs/118020
Approved by: gjb (mentor)
MFC after: 5 days

11 years agoMerge recent vendor changes:
mm [Tue, 28 Aug 2012 12:25:37 +0000 (12:25 +0000)]
Merge recent vendor changes:
3100 zvol rename fails with EBUSY when dirty
3104 eliminate empty bpobjs
3120 zinject hangs in zfsdev_ioctl() due to uninitialized zc

References:
  https://www.illumos.org/issues/3100
  https://www.illumos.org/issues/3104
  https://www.illumos.org/issues/3120

Obtained from: illumos (vendor/illumos, vendor/illumos-sys)
MFC after: 2 weeks

11 years agoFix misspelled "Infiniband".
jhb [Tue, 28 Aug 2012 11:34:09 +0000 (11:34 +0000)]
Fix misspelled "Infiniband".

Submitted by: gcooper
MFC after: 3 days

11 years ago- Don't allow watchdogd(8) to be swapped out.
zont [Tue, 28 Aug 2012 08:38:53 +0000 (08:38 +0000)]
- Don't allow watchdogd(8) to be swapped out.
  On machines with huge amount of swap and high IO activity,
  watchdogd(8) may wait for a swap memory longer than timeout and
  sometimes fires.

Approved by: kib (mentor)
MFC after: 1 week

11 years agooops, make cfg read-write.
adrian [Tue, 28 Aug 2012 06:52:00 +0000 (06:52 +0000)]
oops, make cfg read-write.

11 years agoThis is an initial board configuration for the D-Link DIR-825 dual-band
adrian [Tue, 28 Aug 2012 06:17:44 +0000 (06:17 +0000)]
This is an initial board configuration for the D-Link DIR-825 dual-band
802.11n router.

The flash layout defaults to a 1 MiB section for the kernel so I'm trying
very hard to squeeze a minimialistic (LZMA compressde) kernel image into
that.

I've verified that it boots through to single user mode fine.

Issues:

* USB doesn't yet work as a module - I need to add something else to the
  USB AR71xx build before that will work.
* There's no switch PHY support - but for now it quite happily behaves
  as a useful dumb switch out of the box.  Phew.
* Since a previous flash attempt trashed my radio configuration block,
  I haven't yet verified whether the wireless works correctly.
  I'll test that out shortly (read: once I re-calibrate the board somehow.)

Thanks to ray@ and the zrouter project for doing some of the initial
hard work in figuring out how to bring this board up.

11 years agoMove to using a flag instead of checking the CPU type each
imp [Tue, 28 Aug 2012 03:46:31 +0000 (03:46 +0000)]
Move to using a flag instead of checking the CPU type each
transaction for the MCI1 rev 2.x write workarounds.

11 years agoStyle: Move these routines to be before the forward declared functions
imp [Tue, 28 Aug 2012 03:27:48 +0000 (03:27 +0000)]
Style: Move these routines to be before the forward declared functions
as is the normal practice.

11 years agoBring in the multi-block patches for mci. These required extensive
imp [Tue, 28 Aug 2012 01:28:52 +0000 (01:28 +0000)]
Bring in the multi-block patches for mci.  These required extensive
restructuring of the driver.  I've tried to preserve the other silicon
workarounds that we've added over the years, but haven't had a chance
to extensively test on other hardware.  On my AT91RM9200 with 30MHz/1
wire/64 block transfers, I've been able to go from ~.66MB/s to
2.25MB/s in the simple tests I performed, almost a 3.5x improvement.
This cuts the boot time almost in half when everything else goes
right (timed from rtc message to login: prompt).

PR: 155214
Submitted by: Ian Lapore

11 years agoOnly print the descriptor contents!
adrian [Mon, 27 Aug 2012 23:27:41 +0000 (23:27 +0000)]
Only print the descriptor contents!

Found by: magical CLANG build environments

Submitted by: Sevan <venture37@gmail.com>

11 years agoDon't grab an unreferenced pointer to the VAP bss node.
adrian [Mon, 27 Aug 2012 23:18:41 +0000 (23:18 +0000)]
Don't grab an unreferenced pointer to the VAP bss node.

11 years agoConvert AP93 to use the new AR724X_BASE configuration file.
adrian [Mon, 27 Aug 2012 21:59:52 +0000 (21:59 +0000)]
Convert AP93 to use the new AR724X_BASE configuration file.

11 years agoSlim down the default AR724X build.
adrian [Mon, 27 Aug 2012 21:53:01 +0000 (21:53 +0000)]
Slim down the default AR724X build.

The AR724X boards tend to come with minimal RAM/flash.

11 years agoConvert to using ulzma.
adrian [Mon, 27 Aug 2012 21:49:37 +0000 (21:49 +0000)]
Convert to using ulzma.

11 years agoImprove the sample rate logging.
adrian [Mon, 27 Aug 2012 20:30:07 +0000 (20:30 +0000)]
Improve the sample rate logging.

11 years agoEnsure that all firstep values are available in ANI.
adrian [Mon, 27 Aug 2012 20:10:38 +0000 (20:10 +0000)]
Ensure that all firstep values are available in ANI.

The comparison assumes maxFirstepLevel is a count, rather than a maximum
value.  The array is 3 entries in size however 'maxFirstepLevel' is 2.

This bug also exists in the AR5212 HAL.

11 years agoFix the debugging output to correctly log CCK errors.
adrian [Mon, 27 Aug 2012 20:03:08 +0000 (20:03 +0000)]
Fix the debugging output to correctly log CCK errors.

11 years agoAdd missing parts to zpool-features.5 manual page
mm [Mon, 27 Aug 2012 19:52:55 +0000 (19:52 +0000)]
Add missing parts to zpool-features.5 manual page

Obtained from: vendor/illumos/dist
MFC after: 2 weeks

11 years agoAdd a few other files that are obsolete if WITH_CLANG_EXTRAS is enabled,
dim [Mon, 27 Aug 2012 19:30:21 +0000 (19:30 +0000)]
Add a few other files that are obsolete if WITH_CLANG_EXTRAS is enabled,
and clang is updated to 3.2.

11 years agoShow error messages if nmount() failed.
delphij [Mon, 27 Aug 2012 19:08:47 +0000 (19:08 +0000)]
Show error messages if nmount() failed.

MFC after: 1 month

11 years agoRework the DMA handling in ida(4) and add locking to make this driver
jhb [Mon, 27 Aug 2012 17:24:07 +0000 (17:24 +0000)]
Rework the DMA handling in ida(4) and add locking to make this driver
MPSAFE.
- Preallocate a full set of QCBs during attach rather than allocating new
  ones on demand to avoid allocations in the I/O path.
- Remove the explicit bus space tag/handle and use bus_*() on the
  relevant 'struct resource' instead.
- Defer logical drive probing to an intrhook.
- Fix ida_detach() to detach and delete child devices (logical drives).
- Update the DMA handling to support EINPROGRESS by moving the work to
  submit a mapped request into the bus_dma callback routine as well as
  add support for freezing the queue when EINPROGRESS is encountered.

Tested by: Marco Steinbach  coco executive-computing de

11 years agoDon't build and install the 07.lpd doc if WITHOUT_LPR is set.
jhb [Mon, 27 Aug 2012 17:15:14 +0000 (17:15 +0000)]
Don't build and install the 07.lpd doc if WITHOUT_LPR is set.

MFC after: 1 week

11 years agouse MALLOC_PRODUCTION for picobsd builds, be more frugal in memory usage.
luigi [Mon, 27 Aug 2012 16:42:32 +0000 (16:42 +0000)]
use MALLOC_PRODUCTION for picobsd builds, be more frugal in memory usage.

11 years agoDont cast from char* to struct chrp_header* which has a bigger alignment
rdivacky [Mon, 27 Aug 2012 14:51:26 +0000 (14:51 +0000)]
Dont cast from char* to struct chrp_header* which has a bigger alignment
requirements. Copy it via union instead. Fixes a clang warning about
alignment.

Reviewed by:    sobomax

11 years agoParly revert r239255: reinstate a default maxswzone on i386, where KVA is
des [Mon, 27 Aug 2012 13:22:27 +0000 (13:22 +0000)]
Parly revert r239255: reinstate a default maxswzone on i386, where KVA is
scarce, but set it slightly higher so we can handle 8 GB of swap.

11 years agoTypo in previous change: print half the theoretical maximum as maximum
pluknet [Mon, 27 Aug 2012 10:59:49 +0000 (10:59 +0000)]
Typo in previous change: print half the theoretical maximum as maximum
recommended amount.

Reported by: <site freebsd at orientalsensation com>
Reviewed by: des

11 years agoCorrectly fetch the MAC address.
kientzle [Mon, 27 Aug 2012 04:43:30 +0000 (04:43 +0000)]
Correctly fetch the MAC address.

Break down the bytes directly into the softc;
the intermediate buffer isn't needed here.
Break down the bytes in the correct order.

11 years agoAdd hint and sysctl support for 4 wire mode.
imp [Mon, 27 Aug 2012 04:30:53 +0000 (04:30 +0000)]
Add hint and sysctl support for 4 wire mode.

PR: 155241
Submitted by: Ian Lapore

11 years agoMinor style(9) nit.
imp [Mon, 27 Aug 2012 04:08:43 +0000 (04:08 +0000)]
Minor style(9) nit.

11 years agoDon't puprosely overclock the SD bus to 30MHz, make the user
imp [Mon, 27 Aug 2012 04:03:49 +0000 (04:03 +0000)]
Don't puprosely overclock the SD bus to 30MHz, make the user
explicltly enable that.  The driver chose to use 60MHz / 2 (30MHz)
most of the time rather than 60MHz / 4 (15MHz) based on the Linux
driver of the time.  This pushes the spec a little in order to not
suffer the penalty of running at 15MHz.  However, when other bus
masters are active in the system, and the user tries 4-wire mode, the
internal bus arbitration would fail with data loss as a result.

# Comments from PR were reworked to reflect my historical perspective

PR: 155214 (partial)
Submitted by: Ian Lepore

11 years agoIn suspend_common(), don't wait for a thread which is in creation, because
davidxu [Mon, 27 Aug 2012 03:09:39 +0000 (03:09 +0000)]
In suspend_common(), don't wait for a thread which is in creation, because
pthread_suspend_all_np() may have already suspended its parent thread.
Add locking code in pthread_suspend_all_np() to only allow one thread
to suspend other threads, this eliminates a deadlock where two or more
threads try to suspend each others.

11 years agoMove AR71XX (MIPS SoCs family) options to options.mips file.
ray [Sun, 26 Aug 2012 20:22:43 +0000 (20:22 +0000)]
Move AR71XX (MIPS SoCs family) options to options.mips file.

PR: 170859
Submitted by: Luiz Otavio O Souza
Approved by: adrian (mentor)

11 years agoAdd libc++ and libcxxrt related files to OptionalObsoleteFiles.inc.
dim [Sun, 26 Aug 2012 14:30:14 +0000 (14:30 +0000)]
Add libc++ and libcxxrt related files to OptionalObsoleteFiles.inc.

MFC after: 1 week

11 years agoExpose DE4 buttons and switches via a de4bsw device, implemented using
rwatson [Sun, 26 Aug 2012 10:40:13 +0000 (10:40 +0000)]
Expose DE4 buttons and switches via a de4bsw device, implemented using
altera_avgen(4).

Fix white space nit that must have arisen during the merge from Perforce.

Submitted by: brooks
Sponsored by: DARPA, AFRL

11 years agoAdd a altera_sdcardc(4) man page link for altera_sdcard(4), as that is
rwatson [Sun, 26 Aug 2012 10:38:02 +0000 (10:38 +0000)]
Add a altera_sdcardc(4) man page link for altera_sdcard(4), as that is
the name that will appear in dmesg.

Sponsored by: DARPA, AFRL

11 years agoFix function name in keg_cachespread_init() assert.
glebius [Sun, 26 Aug 2012 09:54:11 +0000 (09:54 +0000)]
Fix function name in keg_cachespread_init() assert.

11 years agoAdd terasic_de4led, a led(4) driver for the on-board 8-element LED on the
rwatson [Sun, 26 Aug 2012 09:21:59 +0000 (09:21 +0000)]
Add terasic_de4led, a led(4) driver for the on-board 8-element LED on the
Terasic DE-4 board.  Allow LED configuration to be set using loader
tunables, not just from userspace, and preconfigure LED 8 as a kernel
heartbeat.  For now, this is a Nexus-attached, BERI-only driver, but it
could be used with other hard and soft cores on Altera FPGAs as well, in
principle.

Sponsored by: DARPA, AFRL

11 years agoEnsure that BAR(0) is set for the PCI slot before the ath(4) PCI registers
adrian [Sun, 26 Aug 2012 04:39:20 +0000 (04:39 +0000)]
Ensure that BAR(0) is set for the PCI slot before the ath(4) PCI registers
are written out.

This allows EEPROM-less NICs on the AR7241 PCIe bus to be correctly
initialised.

Tested:

* AP91 (AR7240+AR9285) - the existing board support didn't break;
* AP99 (AR7241+AR9287) - this fixed the configuration of the AR9287 PCI.

11 years agoCreate a skeleton AR724x SoC board configuration for use by AR724x devices.
adrian [Sun, 26 Aug 2012 04:36:59 +0000 (04:36 +0000)]
Create a skeleton AR724x SoC board configuration for use by AR724x devices.

11 years agoMove this magic check to only occur if no eeprom data is given.
adrian [Sun, 26 Aug 2012 04:26:49 +0000 (04:26 +0000)]
Move this magic check to only occur if no eeprom data is given.

Tested on:

* AP99 (AR7241+AR9287)

11 years agoAdd EEPROM data hooks for the AR9287.
adrian [Sun, 26 Aug 2012 04:26:25 +0000 (04:26 +0000)]
Add EEPROM data hooks for the AR9287.

Tested:
* AP99 Reference board (AR7241 + AR9287)

11 years agoAdd ARM11 support for elf trampoline
gonzo [Sun, 26 Aug 2012 02:34:03 +0000 (02:34 +0000)]
Add ARM11 support for elf trampoline

11 years agoAdd support for ARM11 cpufunc
gonzo [Sun, 26 Aug 2012 02:23:21 +0000 (02:23 +0000)]
Add support for ARM11 cpufunc

Obtained from: NetBSD (partially)

11 years agoGrammar fix: s/NIC's/NICs/
gjb [Sun, 26 Aug 2012 01:21:02 +0000 (01:21 +0000)]
Grammar fix: s/NIC's/NICs/

MFC after: 3 days

11 years agoCall set_pcpu for ARMv6 architecture too
gonzo [Sun, 26 Aug 2012 00:53:00 +0000 (00:53 +0000)]
Call set_pcpu for ARMv6 architecture too

11 years agoMerge fix for hang on ARM11 from NetBSD
gonzo [Sun, 26 Aug 2012 00:46:57 +0000 (00:46 +0000)]
Merge fix for hang on ARM11 from NetBSD

11 years agoPiggyback MIPS changes and add ARM syscons support for devices with
gonzo [Sat, 25 Aug 2012 23:59:31 +0000 (23:59 +0000)]
Piggyback MIPS changes and add ARM syscons support for devices with
framebuffer

While here - sort #if defined() order alphabetically

11 years agoFor building libstdc++ and libsupc++, filter out any -stdlib=libc++
dim [Sat, 25 Aug 2012 23:08:24 +0000 (23:08 +0000)]
For building libstdc++ and libsupc++, filter out any -stdlib=libc++
option from CXXFLAGS, otherwise these libraries will not build.
Similarly, filter out any -std=xxx options that aren't supported.

Submitted by: Yamaya Takashi <yamayan@kbh.biglobe.ne.jp>
MFC after: 2 weeks

11 years agoReturn "locally assigned" Enclosure Logical Identifier instead of 8 zero
mav [Sat, 25 Aug 2012 23:01:57 +0000 (23:01 +0000)]
Return "locally assigned" Enclosure Logical Identifier instead of 8 zero
bytes. Zeroes there are incorrect and tend to cause false device ID matches.

11 years agoAdd terasic_mtl(4), a device driver for the Terasic Multi-Touch LCD,
rwatson [Sat, 25 Aug 2012 22:35:29 +0000 (22:35 +0000)]
Add terasic_mtl(4), a device driver for the Terasic Multi-Touch LCD,
used with Terasic's DE-4 and other similar FPGA boards.  This display
is 800x480 and includes a capacitive touch screen, multi-touch
gesture recognition, etc.  This device driver depends on a Cambridge-
provided IP core that allows the MTL device to be hooked up to the
Altera Avalon SoC bus, and also provides a VGA-like text frame buffer.

Although it is compiled as a single device driver, it actually
implements a number of different device nodes exporting various
aspects of this multi-function device to userspace:

- Simple memory-mapped driver for the MTL 24-bit pixel frame buffer.
- Simple memory-mapped driver for the MTL control register set.
- Simple memory-mapped driver for the MTL text frame buffer.
- syscons attachment for the MTL text frame buffer.

This driver attaches directly to Nexus as is common for SoC device
drivers, and for the time being is considered BERI-specific, although
in principle it might be used with other hard and soft cores on
Altera FPGAs.

Control registers, including touchscreen input, are simply memory
mapped; in the future it would be desirable to hook up a more
conventional device node that can stream events, support kqueue(2)/
poll(2)/select(2), etc.

This is the first use of syscons on MIPS, as far as I can tell, and
there are some loose ends, such as an inability to use the hardware
cursor.  More fundamentally, it appears that syscons(4) assumes that
either a host is PC-like (i386, amd64) *or* it must be using a
graphical frame buffer.  While the MTL supports a graphical frame
buffer, using the text frame buffer is preferable for console use.
Fixing this issue in syscons(4) requires non-trivial changes, as the
text frame buffer support assumes that direct memory access can be
done to the text frame buffer without using bus accessor methods,
which is not the case on MIPS.  As a workaround for this, we instead
double-buffer and pretend to be a graphical frame buffer exposing
text accessor methods, leading to some quirks in syscons behaviour.

Sponsored by: DARPA, AFRL

11 years agoStyle cleanup
gonzo [Sat, 25 Aug 2012 21:13:00 +0000 (21:13 +0000)]
Style cleanup

11 years agoDo not swap byte order if we assign default value for intr_cells
gonzo [Sat, 25 Aug 2012 20:18:12 +0000 (20:18 +0000)]
Do not swap byte order if we assign default value for intr_cells

11 years agoARM11 might have more then 32 interrupts, e.g. BCM2835: 72 interrupts
gonzo [Sat, 25 Aug 2012 20:13:19 +0000 (20:13 +0000)]
ARM11 might have more then 32 interrupts, e.g. BCM2835: 72 interrupts

11 years agoAdd clrex, strex , ldrex, strex and variants
gonzo [Sat, 25 Aug 2012 20:01:31 +0000 (20:01 +0000)]
Add clrex, strex , ldrex, strex and variants

Submitted by: Alexander Rybalko

11 years agoWhen using -stdlib=libc++, add the correct dependency to .depend in
dim [Sat, 25 Aug 2012 19:30:15 +0000 (19:30 +0000)]
When using -stdlib=libc++, add the correct dependency to .depend in
bsd.prog.mk.

Submitted by: Yamaya Takashi <yamayan@kbh.biglobe.ne.jp>
MFC after: 2 weeks

11 years agoAdd isf(4), a driver for the Intel StrataFlash family of NOR flash parts.
brooks [Sat, 25 Aug 2012 18:08:20 +0000 (18:08 +0000)]
Add isf(4), a driver for the Intel StrataFlash family of NOR flash parts.

The driver attempts to support all documented parts, but has only been
tested with the 512Mbit part on the Terasic DE4 FPGA board.  It should be
trivial to adapt the driver's attach routine to other embedded boards
using with any parts in the family.

Also import isfctl(8) which can be used to erase sections of the flash.

Sponsored by: DARPA, AFRL

11 years agoAdd MD syscons header file for MIPS.
rwatson [Sat, 25 Aug 2012 17:57:50 +0000 (17:57 +0000)]
Add MD syscons header file for MIPS.

Sponsored by: DARPA, AFRL

11 years agoDon't include syscons in the config just yet. We haven't imported the
brooks [Sat, 25 Aug 2012 17:34:48 +0000 (17:34 +0000)]
Don't include syscons in the config just yet.  We haven't imported the
touchscreen driver yet.

11 years agoUnbreak tinderbox.
rpaulo [Sat, 25 Aug 2012 17:15:33 +0000 (17:15 +0000)]
Unbreak tinderbox.

11 years agoRetire PV_TABLE_MOD. When we destroy or write protect a dirty mapping,
alc [Sat, 25 Aug 2012 16:55:38 +0000 (16:55 +0000)]
Retire PV_TABLE_MOD.  When we destroy or write protect a dirty mapping,
we call vm_page_dirty().  Maintaining the PV_TABLE_MOD flag, in addition,
serves no useful purpose.

11 years agoAdd libcxxrt's objects (prefixing them with cxxrt_ to avoid collisions)
dim [Sat, 25 Aug 2012 13:15:44 +0000 (13:15 +0000)]
Add libcxxrt's objects (prefixing them with cxxrt_ to avoid collisions)
to libc++.a and libc++_p.a, to make static linking of C++ executables
with libc++ easier.  This is similar to the approach used in libstdc++.

MFC after: 2 weeks

11 years agoAdd reference kernel configurations for FreeBSD/beri in simulation, on the
rwatson [Sat, 25 Aug 2012 12:02:13 +0000 (12:02 +0000)]
Add reference kernel configurations for FreeBSD/beri in simulation, on the
Terasic DE-4, and Terasic tPad Altera-based boards.

Sponsored by: DARPA, AFRL

11 years agoMinor mdoc fix.
joel [Sat, 25 Aug 2012 11:34:55 +0000 (11:34 +0000)]
Minor mdoc fix.

11 years agoAdd altera_jtag_uart(4), a device driver for Altera's JTAG UART soft core,
rwatson [Sat, 25 Aug 2012 11:30:36 +0000 (11:30 +0000)]
Add altera_jtag_uart(4), a device driver for Altera's JTAG UART soft core,
which presents a UART-like interface over the Avalon bus that can be
addressed over JTAG.  This IP core proves extremely useful, allowing us to
connect trivially to the FreeBSD console over JTAG for FPGA-embedded hard
and soft cores.  As interrupts are optionally configured for this soft
core, we support both interrupt-driven and polled modes of operation,
which must be selected using device.hints.  UART instances appear in /dev
as ttyu0, ttyu1, etc.

However, it also contains a number of quirks, which make it difficult to
tell when JTAG is connected, and some buffering issues.  We work around
these as best we can, using various heuristics.

While the majority of this device driver is not only not BERI-specific,
but also not MIPS-specific, for now add its defines in the BERI files
list, as the console-level parts are aware of where the first JTAG UART
is mapped on Avalon, and contain MIPS-specific address translation, to
use before Newbus and device.hints are available.

Sponsored by: DARPA, AFRL

11 years agoAdd a device driver for the Altera University Program SD Card IP Core,
rwatson [Sat, 25 Aug 2012 11:19:20 +0000 (11:19 +0000)]
Add a device driver for the Altera University Program SD Card IP Core,
which can be synthesised in Altera FPGAs.  An altera_sdcardc device
probes during the boot, and /dev/altera_sdcard devices come and go as
inserted and removed.  The device driver attaches directly to the
Nexus, as is common for system-on-chip device drivers.

This IP core suffers a number of significant limitations, including a
lack of interrupt-driven I/O -- we must implement timer-driven polling,
only CSD 0 cards (up to 2G) are supported, there are serious memory
access issues that require the driver to verify writes to memory-mapped
buffers, undocumented alignment requirements, and erroneous error
returns.  The driver must therefore work quite hard, despite a fairly
simple hardware-software interface.  The IP core also supports at most
one outstanding I/O at a time, so is not a speed demon.

However, with the above workarounds, and subject to performance
problems, it works quite reliably in practice, and we can use it for
read-write mounts of root file systems, etc.

Sponsored by: DARPA, AFRL