summaryrefslogtreecommitdiffstats
path: root/sys/mips
Commit message (Collapse)AuthorAgeFilesLines
...
* When allocating memory from bootmem for the kernel to use, try to leave aboutjmallett2010-12-281-0/+8
| | | | | | | | | | | | 2MB of memory in the bootmem allocator for the SDK to use internally at a later point. It'd be nice if there were some functions we could call before allocating memory to let various facilities reserve some memory, but for now this seems sufficient. Previously some unfortunate systems could give up all (or at least most) of their memory to the kernel from bootmem, and then allocating command queues for packet output and the like would fail later in the boot process (which in turn would lead to crashes even later.) Reported by: kan
* Include std.sentry5 from the SENTRY5 kernel configuration. This wasnwhitehorn2010-12-221-0/+1
| | | | apparently missed in r215270.
* o) Add support for the Lanner MR-321X/MR-325, which is just a modified MR-320.jmallett2010-12-161-0/+1
| | | | o) On the Lanner MR-730, disable PCIe lane swap, per vendor.
* - include argument should be in quotesgonzo2010-12-164-4/+4
|
* Make the ELF trampoline binary ELF executable (and do some cleanup).jchandra2010-12-162-3/+19
| | | | | | | | | - Remove the -shared flag for the trampoline binary, generate an ELF executable instead of a shared object. - No need to generate tmphack.S, move the code to sys/mips/mips/inckern.S - No need generate opt_kernname.h, KERNNAME can be passed with -D Reviewed by: gonzo, imp
* Updates for I2C devices on XLR engg boards.jchandra2010-12-133-34/+10
| | | | | | | - ds1374u : use multi-byte write. - at24co2n, max6657: remove mutex, iicbus has the necessary locking. Submitted by: Sreekanth M. S. (kanthms at netlogicmicro com)
* fix mips build breakage introduced in r216375: atomic_store_int doesn't existsavg2010-12-131-3/+1
| | | | | | | | | | | | | 1) 32-bit assignment are expected to always be atomic. 2) Release/acquire memory barrier semantics doesn't seem to be needed here. So a simple assignment can be used. Remove unused port_set_counter() while here, it also used to mis-use atomic_set_int(). Reported by: jhb Pointyhat to: avg MFC after: 3 weeks
* I2C drivers for XLR/XLS processors.jchandra2010-12-129-263/+711
| | | | | | | | | - Major update to xlr_i2c.c: do multi-byte ops correctly, remove unnecessary code, add mutex to protect bus operations, style(9) fixes. - Drivers for I2C devices on XLR/XLS engineering boards, ds1374u RTC, max6657 temparature sensor and at24co2n EEPROM. Submitted by: Sreekanth M. S. (kanthms at netlogicmicro com)
* fix atomic_set_xxx misuse in rgeavg2010-12-111-2/+2
| | | | | | | It seems that atomic_set_xxx and atomic_store_xxx were confused. Reviewed by: jhb (general issue) MFC after: 3 weeks
* Fix compilation when DEBUG option is enabled.jchandra2010-12-093-9/+1
| | | | | | | | - remove unused code in mips/rmi/xlr_pci.c - remove unused variable in mips/rmi/dev/nlge/if_nlge.c - fix reference to old function in mips/mips/pmap.c Reported by: Prabhath Raman (prabhath at netlogicmicro com)
* - dump_avail layout should be sequence of [start, end)gonzo2010-12-098-18/+12
| | | | | | pairs, not <start, size>. Spotted by: alc@
* - Populate dump_avail with proper values from phys_availgonzo2010-12-099-3/+43
|
* swi_vm() for mips.jchandra2010-12-091-0/+3
|
* UMA_MD_SMALL_ALLOC for mips.jchandra2010-12-094-12/+102
| | | | | | | | | Implement uma_small_alloc() and uma_small_free() for mips that allocates pages from direct mapped memory. Uses the same mechanism as the page table page allocator, so that we allocate from KSEG0 in 32 bit, and from XKPHYS on 64 bit. Reviewed by: alc, jmallett
* Fix double ;;kevlo2010-12-061-1/+1
|
* 1. Fix off by one errors in calls to MIPS_DIRECT_MAPPABLE, reported by alc@jchandra2010-12-032-17/+12
| | | | | | | 2. Remove unnecessary #defines from vmparam.h Submitted by: alc (2) Reviewed by: alc (1)
* Fixup for r216141, dump_add_page needs to be non-static now.jchandra2010-12-032-4/+6
| | | | | Add it to sys/mips/include/md_var.h, make dump_drop_page non-static too for completeness.
* Revert r216134. This checkin broke platforms where bus_space are macros:brucec2010-12-031-67/+8
| | | | | they need to be a single statement, and do { } while (0) doesn't work in this situation so revert until a solution can be devised.
* Disallow passing in a count of zero bytes to the bus_space(9) functions.brucec2010-12-021-8/+67
| | | | | | | | | Passing a count of zero on i386 and amd64 for [I386|AMD64]_BUS_SPACE_MEM causes a crash/hang since the 'loop' instruction decrements the counter before checking if it's zero. PR: kern/80980 Discussed with: jhb
* Add interrupt describing and binding to CIU.jmallett2010-12-011-1/+115
|
* Run all poll requests through a single function that can either do the genericjmallett2010-11-307-63/+43
| | | | | | link state polling or media-specific ones, while avoidiing changing link state on interfaces that use miibus; this substantially speeds up link time on interface (re)initialization.
* Display some Octeon 2 features and a feature for distinguishing between PCIejmallett2010-11-301-0/+3
| | | | implementations.
* Don't free the work queue entry that we're using to hold the scatter-gatherjmallett2010-11-291-4/+8
| | | | | | | | | | | | | | list on exit from the transmit path. The scatter-gather list itself can be asynchronously DMAed to the transmit hardware, and we could actually lock up the transmitter if any of a number of races around this were lost. Instead, let the PKO free the scatter-gather list when it is done with it, and use the "i" bit in each segment of the packet to avoid having them go into the FPA. This fixes an unrecoverable transmit stall under transmit load. MFC after: 3 days
* Merge Cavium Octeon SDK 2.0 Simple Executive; this brings some fixes and newjmallett2010-11-284-21/+69
| | | | | | | facilities as well as support for the Octeon 2 family of SoCs. XXX Note that with our antediluvian assembler, we can't support some Octeon 2 instructions and fall back to using the old ones instead.
* - Add watchdog driver for Cavium Octeon. At the moment onlygonzo2010-11-283-0/+308
| | | | UP systems are supported.
* o) Remove some commented out or unimplemented code.jmallett2010-11-289-364/+89
| | | | | | | | | o) Remove some options that are configurable on Linux but not FreeBSD. o) Centralize open/poll/stop routines for XAUI and SGMII and use the common uninit routine directly rather than providing a wrapper for it. The init functions for these interfaces are now identical and the common init routine could merge in setting those function pointers except that some hardware seems to use no open/poll/stop method?
* Fix issue noted by alc while reviewing r215938:jchandra2010-11-281-1/+1
| | | | | | | | The current implementation of vm_page_alloc_freelist() does not handle order > 0 correctly. Remove order parameter to the function and use it only for order 0 pages. Submitted by: alc
* Set MACHINE_ARCH based on ABI and endianness.jmallett2010-11-281-1/+17
| | | | Reviewed by: imp
* Remove unused and broken code to implement POW send and POW-only devices; ajmallett2010-11-285-232/+5
| | | | separate POW driver makes more sense, generally.
* Use if_transmit to avoid ifq locking in transmit path.jmallett2010-11-271-26/+15
|
* Use if_transmit method instead of if_start, this avoids the interface queue ↵jchandra2010-11-272-86/+86
| | | | | | | | lock. Use the hardware IP checksum verification on receive. Submitted by: Sriram Gorti (srgorti at netlogicmicro dot com)
* After some off-list discussion, revert a number of changes to thedim2010-11-222-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | DPCPU_DEFINE and VNET_DEFINE macros, as these cause problems for various people working on the affected files. A better long-term solution is still being considered. This reversal may give some modules empty set_pcpu or set_vnet sections, but these are harmless. Changes reverted: ------------------------------------------------------------------------ r215318 | dim | 2010-11-14 21:40:55 +0100 (Sun, 14 Nov 2010) | 4 lines Instead of unconditionally emitting .globl's for the __start_set_xxx and __stop_set_xxx symbols, only emit them when the set_vnet or set_pcpu sections are actually defined. ------------------------------------------------------------------------ r215317 | dim | 2010-11-14 21:38:11 +0100 (Sun, 14 Nov 2010) | 3 lines Apply the STATIC_VNET_DEFINE and STATIC_DPCPU_DEFINE macros throughout the tree. ------------------------------------------------------------------------ r215316 | dim | 2010-11-14 21:23:02 +0100 (Sun, 14 Nov 2010) | 2 lines Add macros to define static instances of VNET_DEFINE and DPCPU_DEFINE.
* Apply the STATIC_VNET_DEFINE and STATIC_DPCPU_DEFINE macros throughoutdim2010-11-142-10/+10
| | | | the tree.
* Remove the 'machine mips' from DEFAULTS. Put the proper 'machine mipsimp2010-11-1325-42/+50
| | | | | | mipsel' or 'machine mips mipseb' into the config file (with a few 64's tossed in for good measure). This will let us build the proper kernels with different worlds as part of make universe.
* Switch to the new network driver nlge, the old rge driver is deprecated now.jchandra2010-11-103-6/+6
|
* rename SWARM_COMMON to std.SWARM so universe doesn't try to build it standaloneimp2010-11-105-4/+4
|
* - Remove <machine/mutex.h>. Most of the headers were empty, and thejhb2010-11-091-2/+0
| | | | | | | | | | | | contents of the ones that were not empty were stale and unused. - Now that <machine/mutex.h> no longer exists, there is no need to allow it to override various helper macros in <sys/mutex.h>. - Rename various helper macros for low-level operations on mutexes to live in the _mtx_* or __mtx_* namespaces. While here, change the names to more closely match the real API functions they are backing. - Drop support for including <sys/mutex.h> in assembly source files. Suggested by: bde (1, 2)
* Fix typos.brucec2010-11-091-4/+4
| | | | | PR: bin/148894 Submitted by: olgeni
* - Provide more registers for GDBgonzo2010-11-081-18/+25
|
* - Add minidump support for FreeBSD/mipsgonzo2010-11-076-28/+699
|
* Adjust the order of operations in spinlock_enter() and spinlock_exit() tojhb2010-11-051-4/+10
| | | | | | | | | | | | | | | | | | work properly with single-stepping in a kernel debugger. Specifically, these routines have always disabled interrupts before increasing the nesting count and restored the prior state of interrupts after decreasing the nesting count to avoid problems with a nested interrupt not disabling interrupts when acquiring a spin lock. However, trap interrupts for single-stepping can still occur even when interrupts are disabled. Now the saved state of interrupts is not saved in the thread until after interrupts have been disabled and the nesting count has been increased. Similarly, the saved state from the thread cannot be read once the nesting count has been decreased to zero. To fix this, use temporary variables to store interrupt state and shuffle it between the thread's MD area and the appropriate registers. In cooperation with: bde MFC after: 1 month
* Don't attach the PCI bus driver if the board we're being run on has PCIe. Thejmallett2010-11-031-0/+2
| | | | two are mutually-exclusive on Octeon.
* Declare the CF GEOM class so that g_modevent will get called, the class willjmallett2010-11-021-0/+2
| | | | be recorded, etc. This fixes libgeom on Octeon.
* Network driver updatesjchandra2010-10-202-7/+7
| | | | | | | - Fix network driver issue on a XLS eval board (major# 8). - Fix issue uncovered by r213475 in check for XGMII Submitted by: Sriram Gorti (srgorti at netlogicmicro dot com)
* On uniprocessor, warn and fixup hardware cpu mask if more than on CPUjchandra2010-10-201-1/+9
| | | | is enabled by the bootloader.
* Converted the remainder of the NIC drivers to use the mii_attach()marius2010-10-152-8/+9
| | | | | | | introduced in r213878 instead of mii_phy_probe(). Unlike r213893 these are only straight forward conversions though. Reviewed by: yongari
* Convert the PHY drivers to honor the mii_flags passed down and convertmarius2010-10-152-10/+12
| | | | | | | | | | | | | | | | | | | | | | | the NIC drivers as well as the PHY drivers to take advantage of the mii_attach() introduced in r213878 to get rid of certain hacks. For the most part these were: - Artificially limiting miibus_{read,write}reg methods to certain PHY addresses; we now let mii_attach() only probe the PHY at the desired address(es) instead. - PHY drivers setting MIIF_* flags based on the NIC driver they hang off from, partly even based on grabbing and using the softc of the parent; we now pass these flags down from the NIC to the PHY drivers via mii_attach(). This got us rid of all such hacks except those of brgphy() in combination with bce(4) and bge(4), which is way beyond what can be expressed with simple flags. While at it, I took the opportunity to change the NIC drivers to pass up the error returned by mii_attach() (previously by mii_phy_probe()) and unify the error message used in this case where and as appropriate as mii_attach() actually can fail for a number of reasons, not just because of no PHY(s) being present at the expected address(es). Reviewed by: jhb, yongari
* Keep polling at 50hz as long as link state is changing.jmallett2010-10-131-3/+15
|
* o) Make it possible to attach a PHY directly to an octe device rather thanjmallett2010-10-138-47/+815
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | using miibus, since for some devices that use multiple addresses on the bus, going through miibus may be unclear, and for devices that are not standard MII PHYs, miibus may throw a fit, necessitating complicated interfaces to fake the interface that it expects during probe/attach. o) Make the mv88e61xx SMI interface in octe attach a PHY directly and fix some mistakes in the code that resulted from trying too hard to present a nice interface to miibus. o) Add a PHY driver for the mv88e61xx. If attached (it is optional in kernel compiles so the default behavior of having a dumb switch is preserved) it will place the switch in a VLAN-tagging mode such that each physical port has a VLAN associated with it and interfaces for the VLANs can be created to address or bridge between them. XXX It would be nice for this to be part of a single module including the SMI interface, and for it to fit into a generic switch configuration framework and for it to use DSA rather than VLANs, but this is a start and gives some sense of the parameters of such frameworks that are not currently present in FreeBSD. In lieu of a switch configuration interface, per-port media status and VLAN settings are in a sysctl tree. XXX There may be some minor nits remaining in the handling of broadcast, multicast and unknown destination traffic. It would also be nice to go through and replace the few remaining magic numbers with macros at some point in the future. XXX This has only been tested with the MV88E6161, but it should work with minimal or no modification on related switches, so support for probing them was included. Thanks to Pat Saavedra of TELoIP and Rafal Jaworowski of Semihalf for their assistance in understanding the switch chipset.
* PCI fix for XLR C revision chips, limit DMA address to the first 2GBjchandra2010-10-062-2/+53
| | | | | | | physical address. Adds a dma tag to the XLR/XLS pci bus with the lowaddr if the CPU happens to be a XLR C rev. Submitted by: Sreekanth M. S. (kanthms at netlogicmicro dot com))
OpenPOWER on IntegriCloud