Commit Graph

1386 Commits

Author SHA1 Message Date
Juli Mallett
85129b4bd4 Use bootverbose to control debug printfs from the Cavium Simple Executive
code.  Also remove an unnecessary CVMX_ENABLE_DEBUG_PRINTS conditional around
what is already a cvmx_dprintf.
2012-11-24 02:12:24 +00:00
Juli Mallett
01a310bd57 o) Add support for specifying a model of Octeon to target at compile-time,
reducing the number of runtime checks done by the SDK code.
o) Group board/CPU information at early startup by subject matter, so that e.g.
   CPU information is adjacent to CPU information and board information is
   adjacent to board information.
2012-11-24 02:00:29 +00:00
Juli Mallett
fcd5eed4f0 Prevent hang on ATCA-7220 when transmitting packets < 60 bytes. 2012-11-19 08:30:29 +00:00
Juli Mallett
d0ebf478da Remove redundant printf of SDK version which already appears earlier in boot. 2012-11-19 08:29:53 +00:00
Juli Mallett
8aff4e5fdd Add basic support for the Radisys-specific PCI console mechanism found on the
Radisys ATCA-7220.
2012-11-19 01:58:20 +00:00
Juli Mallett
8961aadb2b o) Do boot descriptor parsing before console setup so that we can use a console
other than UART 0 from the outset.
o) Print board information from sysinfo after consoles have been initialized
   rather than doing it during boot descriptor parsing.
o) Use cvmx_safe_printf and platform_reset rather than panic when doing very
   early boot descriptor parsing before the console is set up.
o) Get rid of the global octeon_bootinfo.
2012-11-19 00:19:27 +00:00
Juli Mallett
2d7499b141 Remove one wholly-unused and buggy routine and some nearby alternative symbols.
While here, also correct a comment that seems to imply that this file is
NetBSD's all-singing, all-dancing locore.S, rather than our conservative set of
assembly support routines.
2012-11-17 23:53:12 +00:00
Adrian Chadd
f447c9bf87 Ensure hwpmc support is correctly included. 2012-11-17 04:11:57 +00:00
Adrian Chadd
54491754cb Make MIPS24k PMC optional on "hwpmc_mips24k."
Requested by:	juli
2012-11-17 04:10:42 +00:00
Adrian Chadd
c612af968c Migrate the AR71xx UART (an 8250 derivative) to hide behind uart_ar71xx.
The AR9330/AR9331 UART is a totally different thing, so having it included
with 'uart' is not going to work out.
2012-11-17 04:05:46 +00:00
Konstantin Belousov
b32ecf44bc Flip the semantic of M_NOWAIT to only require the allocation to not
sleep, and perform the page allocations with VM_ALLOC_SYSTEM
class. Previously, the allocation was also allowed to completely drain
the reserve of the free pages, being translated to VM_ALLOC_INTERRUPT
request class for vm_page_alloc() and similar functions.

Allow the caller of malloc* to request the 'deep drain' semantic by
providing M_USE_RESERVE flag, now translated to VM_ALLOC_INTERRUPT
class. Previously, it resulted in less aggressive VM_ALLOC_SYSTEM
allocation class.

Centralize the translation of the M_* malloc(9) flags in the single
inline function malloc2vm_flags().

Discussion started by:	"Sears, Steven" <Steven.Sears@netapp.com>
Reviewed by:	alc, mdf (previous version)
Tested by:	pho (previous version)
MFC after:	2 weeks
2012-11-14 20:01:40 +00:00
Alan Cox
6961891ea1 The function pmap_alloc_direct_page() unconditionally zeroes the returned
page.  Therefore, it is really inappropriate for use by the function
uma_small_alloc().  The effect of using it was that every page was zeroed
at least once and possibly twice if M_ZERO was passed as a "wait" flag.
2012-11-14 17:33:00 +00:00
Juli Mallett
36e83ea016 Add preliminary Octeon PCI console support. Radisys-specific PCI console
support may follow soon (it uses a proprietary memory layout, but operation
looks pretty trivial.)
2012-11-13 07:39:49 +00:00
Juli Mallett
43364eac2a Add some useful options to consider. 2012-11-13 07:34:46 +00:00
Adrian Chadd
f8eb8ef711 Update AP96 to directly attach an arswitch. 2012-11-07 23:50:28 +00:00
Aleksandr Rybalko
c11de6f059 Hint miibus to attach arswitch on AP91, AP93 and RSPRO boards.
Submitted by:	Luiz Otavio O Souza
Approved by:	adrian (menthor)
2012-11-07 22:46:30 +00:00
Attilio Rao
cfedf924d3 Rework the known rwlock to benefit about staying on their own
cache line in order to avoid manual frobbing but using
struct rwlock_padalign.

Reviewed by:	alc, jimharris
2012-11-03 23:03:14 +00:00
Adrian Chadd
6ff182d83d Drop this from 500 to 128, to save a little space on memory constrained
platforms.
2012-11-02 05:23:05 +00:00
Adrian Chadd
0fd5c74381 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
Juli Mallett
405b925e39 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
Juli Mallett
ca765bc7ab Fix longstanding misprint. 2012-10-31 04:44:32 +00:00
Juli Mallett
3ef3b736dc 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
Juli Mallett
3631682eab Actually check board type rather than using a specialized octeon_is_simulation
function.
2012-10-30 06:36:14 +00:00
Juli Mallett
3fc2bc974b 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
Juli Mallett
d1d2f57d4a Remove stale declarations. 2012-10-30 06:19:46 +00:00
Juli Mallett
684ba62e3f Speed feature tests and initialize helper configuration that some CPUs require. 2012-10-30 06:07:30 +00:00
Juli Mallett
0a5f2ecced Add a sysctl to change the LED display. 2012-10-29 07:06:23 +00:00
Juli Mallett
a1d1611d51 Wrap some long lines and display board serial numbers at boot. 2012-10-29 02:10:20 +00:00
Juli Mallett
1f51baaa92 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
Juli Mallett
5eceedc5a0 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
Alan Cox
e3978f3316 Eliminate a redundant TLB invalidation from pmap_pv_reclaim(). 2012-10-27 22:43:30 +00:00
Juli Mallett
320a9376e9 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
Juli Mallett
452f8dcf7b 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
Andrew Thompson
a28dd512d3 Fix spelling of NFSCL option. 2012-10-23 22:58:25 +00:00
Warner Losh
4fa33efb6f Turns out the nvram env was common, so move it back up to get PB92 working. 2012-10-23 19:17:43 +00:00
Warner Losh
52c1230206 Add RT305x specific devices here. 2012-10-23 15:25:48 +00:00
Andre Oppermann
75e1bc999e 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
Eitan Adler
db702c59cf remove duplicate semicolons where possible.
Approved by:	cperciva
MFC after:	1 week
2012-10-22 03:00:37 +00:00
Attilio Rao
a42ac676f5 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
Alan Cox
3bd3f63d50 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 Rao
3a4730256a 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
Alan Cox
312188ac4a 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
Alan Cox
4ed2e31f01 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
Alan Cox
948aea4031 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
Alan Cox
d68ca35a82 Eliminate a stale and a duplicated comment. 2012-10-05 04:35:20 +00:00
Alan Cox
54f3305cca Reimplement pmap_qremove() using the new TLB invalidation function for
efficiently invalidating address ranges.
2012-10-03 05:42:15 +00:00
Alan Cox
9a974b9024 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
Hans Petter Selasky
0324d54acb 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
Alan Cox
e4b8a2fc5a 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 Schouten
7cbef24e1a 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