Commit Graph

1367 Commits

Author SHA1 Message Date
adrian
5b01d738b3 Drop this from 500 to 128, to save a little space on memory constrained
platforms.
2012-11-02 05:23:05 +00:00
adrian
8acc9b7705 Free the dma map -after- it's checked, not before. Or you'll be
potentially referencing already-freed memory.
2012-11-02 05:22:32 +00:00
jmallett
d082d2f2c5 Don't disable PCIe just because the host is not a PCI host; the latter flag
only applies to non-PCIe systems.  If PCIe is in target mode, it will simply
and gracefully fail to attach of its own accord.
2012-11-01 20:39:39 +00:00
jmallett
62321d8c39 Fix longstanding misprint. 2012-10-31 04:44:32 +00:00
jmallett
edb74bf530 If the CF physical base is 0, attach no CF devices. This fixes a warning
about a 0 passed to cvmx_phys_to_ptr on systems without a CF interface,
such as the RSYS4GBE.
2012-10-31 04:23:36 +00:00
jmallett
8b95820a21 Actually check board type rather than using a specialized octeon_is_simulation
function.
2012-10-30 06:36:14 +00:00
jmallett
5db705b6a7 Remove oct_read64 and oct_write64 and use their equivalents from the Simple
Executive, which are used everywhere else in the Octeon port.  While here,
remove other unused things from octeon_pcmap_regs.h.
2012-10-30 06:29:17 +00:00
jmallett
cb4217a037 Remove stale declarations. 2012-10-30 06:19:46 +00:00
jmallett
1729e10b37 Speed feature tests and initialize helper configuration that some CPUs require. 2012-10-30 06:07:30 +00:00
jmallett
7c53bf7ecd Add a sysctl to change the LED display. 2012-10-29 07:06:23 +00:00
jmallett
dc7f834036 Wrap some long lines and display board serial numbers at boot. 2012-10-29 02:10:20 +00:00
jmallett
d209784979 Use Simple Executive LED display routines, which correctly use the LED base
address passed from the bootloader, rather than using a hard-coded value.

Make FreeBSD announce itself on the LED display similar to other kernels.

Remove uses of the previous LED routines, which were under-used and only used
in drivers for what seem like debugging purposes, despite those drivers being
widely-tested.

Remove several inlines for accessing memory that duplicate other functions
which are now used instead, as they are now entirely unused.
2012-10-29 00:51:53 +00:00
jmallett
8f92bb074b Add missing return that broke 8-bit CF support in refactoring in r222671.
Tested on a Cavium CN5860-EVB-NIC4.  This was broken for over a year.
2012-10-27 23:36:41 +00:00
alc
1ff1c1a2d1 Eliminate a redundant TLB invalidation from pmap_pv_reclaim(). 2012-10-27 22:43:30 +00:00
jmallett
af24b41220 Add support for Radisys as a vendor of Octeon hardware. Add some preliminary
support for what their boot loader refers to as the "RSYS4GBE", of which there
are two instances ("Data Processing Blocks") on the Radisys ATCA-7220.
2012-10-26 00:08:50 +00:00
jmallett
06f94170ed Don't attach if the bootloader has not indicated that we're a PCI host. This
fixes booting on systems which are PCI targets.
2012-10-26 00:04:05 +00:00
thompsa
afe2d7631c Fix spelling of NFSCL option. 2012-10-23 22:58:25 +00:00
imp
ac417b1e9c Turns out the nvram env was common, so move it back up to get PB92 working. 2012-10-23 19:17:43 +00:00
imp
a049a3abe6 Add RT305x specific devices here. 2012-10-23 15:25:48 +00:00
andre
060f9b0155 Remove ZERO_COPY_SOCKETS from kernel configuration as the current
COW based approach is not safe and should not be used in production.
2012-10-22 15:04:23 +00:00
eadler
3f7a414911 remove duplicate semicolons where possible.
Approved by:	cperciva
MFC after:	1 week
2012-10-22 03:00:37 +00:00
attilio
85c1a64cec Disconnect non-MPSAFE NTFS from the build in preparation for dropping
GIANT from VFS. This code is particulary broken and fragile and other
in-kernel implementations around, found in other operating systems,
don't really seem clean and solid enough to be imported at all.
If someone wants to reconsider in-kernel NTFS implementation for
inclusion again, a fair effort for completely fixing and cleaning it
up is expected.

In the while NTFS regular users can use FUSE interface and ntfs-3g
port to work with their NTFS partitions.

This is not targeted for MFC.
2012-10-17 11:30:00 +00:00
alc
5b3318cf9e Correct an error in pmap_pv_reclaim(). It can legitimately encounter
wired mappings.  If it does, it should just skip them.
2012-10-14 03:40:08 +00:00
attilio
6997194551 Add an unified macro to deny ability from the compiler to reorder
instruction loads/stores at its will.
The macro __compiler_membar() is currently supported for both gcc and
clang, but kernel compilation will fail otherwise.

Reviewed by:	bde, kib
Discussed with:	dim, theraven
MFC after:	2 weeks
2012-10-09 14:32:30 +00:00
alc
65071837b0 Optimize the TLB invalidations performed by pmap_protect(). Use the new
range-based invalidation function instead of performing per-page
invalidations.  Don't bother invalidating mappings that don't have PTE_D
set, since they don't allow write access.
2012-10-07 18:07:45 +00:00
alc
0806d64a58 In general pmap implementations do not set the wired attribute on
the temporary mappings that are used to implement operations like
pmap_zero_page().  There is no reason for the MIPS pmap to deviate
from that practice.
2012-10-06 19:33:52 +00:00
alc
78ade40ed1 Correct two pessimizations in pmap_extract_and_hold(). Test the PTE for
having PTE_RO set instead of PTE_D.  This avoids some unnecessary failures
by pmap_extract_and_hold() that will have to be handled by a call to
vm_fault_hold().  Testing the PTE for both being non-zero and having PTE_V
set is redundant.  The latter suffices.
2012-10-06 19:05:50 +00:00
alc
9f7ae26674 Eliminate a stale and a duplicated comment. 2012-10-05 04:35:20 +00:00
alc
e19854ff7c Reimplement pmap_qremove() using the new TLB invalidation function for
efficiently invalidating address ranges.
2012-10-03 05:42:15 +00:00
alc
8eccaae22c Introduce a new TLB invalidation function for efficiently invalidating
address ranges, and use this function in pmap_remove().

Tested by:	jchandra
2012-10-02 07:14:22 +00:00
hselasky
c081610de9 Inherit USB mode from RootHUB port where the USB device is connected.
Only RootHUB ports can be dual mode. Disallow OTG ports on external HUBs.
This simplifies some checks in the USB controller drivers.

MFC after:	1 week
2012-10-01 05:42:43 +00:00
alc
55f6ff40ed Eliminate a stale comment. It describes another use case for the pmap in
Mach that doesn't exist in FreeBSD.
2012-09-28 05:30:59 +00:00
ed
123cfec6ca Prefer __containerof() above member2struct().
The first does proper checking of the argument types, while the latter
does not.
2012-09-15 19:28:54 +00:00
alc
2bc702613a Simplify pmap_unmapdev(). Since kmem_free() eventually calls pmap_remove(),
pmap_unmapdev()'s own direct efforts to destroy the page table entries are
redundant, so eliminate them.

Don't set PTE_W on the page table entry in pmap_kenter{,_attr}() on MIPS.
Setting PTE_W on MIPS is inconsistent with the implementation of this
function on other architectures.  Moreover, PTE_W should not be set, unless
the pmap's wired mapping count is incremented, which pmap_kenter{,_attr}()
doesn't do.

MFC after:	10 days
2012-09-10 16:11:29 +00:00
attilio
8dece93b14 userret() already checks for td_locks when INVARIANTS is enabled, so
there is no need to check if Giant is acquired after it.

Reviewed by:	kib
MFC after:	1 week
2012-09-08 18:27:11 +00:00
alc
c069e61b00 pmap_remove:
Avoid re-walking the page table from the root for every PTE examined.

  Tidy up some of pmap_remove()'s helper functions.

pmap_enter:

  Set PV_TABLE_REF whenever the physical page being mapped is managed, not
  just when it is writeable.

  Only call pmap_update_page() when the old mapping was valid.  If there was
  no prior valid mapping, then pmap_update_page() serves no useful purpose.
  However, it will interrupt every processor that has the pmap active.

pmap_enter_quick_locked:

  Always set PTE_RO.

pmap_emulate_modified:

  Don't set PV_TABLE_REF.

  Eliminate a nonsensical comment.
2012-09-08 17:43:20 +00:00
alc
9cfbfbb356 Eliminate unnecessary NULL checks. 2012-09-07 06:12:28 +00:00
jhb
0bc0a2586c Dynamically allocate the S/G lists passed to callback routines rather than
allocating them on the stack of various bus_dmamap_load*() functions.  The
S/G lists are stored in the DMA tags.  This matches the implementation on
all other platforms.

Discussed with:	scottl, gibbs
Tested by:	stas (arm@)
2012-09-06 20:16:59 +00:00
brooks
a949f3567e Don't hardcode paths to MFS_IMAGE in the kernel config. When they don't
exist they don't cause "make tinderbox" to fail.

Reported by:	jhb
2012-09-05 15:55:51 +00:00
alc
b1adba8ac6 Rename {_,}pmap_unwire_pte_hold() to {_,}pmap_unwire_ptp() and update the
comment describing them.  Both the function names and the comment had grown
stale.  Quite some time has passed since these pmap implementations last
used the page's hold count to track the number of valid mapping within a
page table page.  Also, returning TRUE from pmap_unwire_ptp() rather than
_pmap_unwire_ptp() eliminates a few instructions from callers like
pmap_enter_quick_locked() where pmap_unwire_ptp()'s return value is used
directly by a conditional statement.
2012-09-05 06:02:54 +00:00
alc
9037eaf691 Calculate the new PTE value in pmap_enter() before acquiring any locks.
Move an assertion to the beginning of pmap_enter().
2012-09-02 04:39:07 +00:00
alc
57f09aa635 Introduce a new software PTE flag that indicates whether the mapping is
for a managed page.

Tested by:	jchandra
2012-09-01 03:46:28 +00:00
adrian
f98fd2305e The DIR-825 cal data is in an odd spot. I don't know why it's here.
(This works on my board because I wrote new caldata into this spot;
but this obviously won't work for stock DIR-825 units out there.)
2012-08-30 17:35:12 +00:00
adrian
5cec390d0d More attempts at space saving.
* add cam as a module to build - but build in scbus/da for now, as
  "cam" as a module includes all cam devices. Hardly space saving.
* Don't build FFS snapshot support.
2012-08-29 22:58:52 +00:00
adrian
3227d08f42 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.
2012-08-29 01:08:36 +00:00
adrian
cfe045600d * Don't compile in sysctl descriptions
* random is fine as a module
2012-08-28 22:50:47 +00:00
adrian
eea1a6d705 oops, make cfg read-write. 2012-08-28 06:52:00 +00:00
adrian
d43b881935 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.
2012-08-28 06:17:44 +00:00
adrian
f4bd2995f8 Convert AP93 to use the new AR724X_BASE configuration file. 2012-08-27 21:59:52 +00:00
adrian
bfa5cadc30 Slim down the default AR724X build.
The AR724X boards tend to come with minimal RAM/flash.
2012-08-27 21:53:01 +00:00