Commit Graph

111 Commits

Author SHA1 Message Date
Juli Mallett
f05957f7c6 o) Make it possible to attach a PHY directly to an octe device rather than
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.
2010-10-13 09:17:44 +00:00
Juli Mallett
2e9de9047c Make the OCTEON1 configuration look like a normal GENERIC configuration. In
particular, add PCI and USB buses and most devices.  Also move to using ULE,
adding INET6, turning on WITNESS by default, etc.
2010-10-02 01:24:20 +00:00
Oleksandr Tymoshenko
02285b4e88 Add GPIO bus to config and hints. Also add sample gpioled device. 2010-09-28 03:34:51 +00:00
Neel Natu
77a9cf6f2a Add 64-bit SWARM board kernel configs. 2010-09-15 05:32:10 +00:00
Neel Natu
391da75b41 Factor out the common parts of the swarm board in SWARM_COMMON and start
including that in SWARM and SWARM_SMP kernel configs.
2010-09-15 05:29:13 +00:00
Warner Losh
747e7efda0 TARGET_64BIT isn't needed anymore, GC it (partial merge from tbemd). 2010-09-13 16:39:33 +00:00
Jayachandran C.
a7834bac09 Rename TARGET_XLR_XLS to CPU_RMI to match other CPU_xxx definitions.
use CPU_RMI all XLR configurations. Update ident string for N32 and
N64 kernels.
2010-08-13 12:56:00 +00:00
Juli Mallett
cea2b8b915 Update the port of FreeBSD to Cavium Octeon to use the Cavium Simple Executive
library:
o) Increase inline unit / large function growth limits for MIPS to accommodate
   the needs of the Simple Executive, which uses a shocking amount of inlining.
o) Remove TARGET_OCTEON and use CPU_CNMIPS to do things required by cnMIPS and
   the Octeon SoC.
o) Add OCTEON_VENDOR_LANNER to use Lanner's allocation of vendor-specific
   board numbers, specifically to support the MR320.
o) Add OCTEON_BOARD_CAPK_0100ND to hard-wire configuration for the CAPK-0100nd,
   which improperly uses an evaluation board's board number and breaks board
   detection at runtime.  This board is sold by Portwell as the CAM-0100.
o) Add support for the RTC available on some Octeon boards.
o) Add support for the Octeon PCI bus.  Note that rman_[sg]et_virtual for IO
   ports can not work unless building for n64.
o) Clean up the CompactFlash driver to use Simple Executive macros and
   structures where possible (it would be advisable to use the Simple Executive
   API to set the PIO mode, too, but that is not done presently.)  Also use
   structures from FreeBSD's ATA layer rather than structures copied from
   Linux.
o) Print available Octeon SoC features on boot.
o) Add support for the Octeon timecounter.
o) Use the Simple Executive's routines rather than local copies for doing reads
   and writes to 64-bit addresses and use its macros for various device
   addresses rather than using local copies.
o) Rename octeon_board_real to octeon_is_simulation to reduce differences with
   Cavium-provided code originally written for Linux.  Also make it use the
   same simplified test that the Simple Executive and Linux both use rather
   than our complex one.
o) Add support for the Octeon CIU, which is the main interrupt unit, as a bus
   to use normal interrupt allocation and setup routines.
o) Use the Simple Executive's bootmem facility to allocate physical memory for
   the kernel, rather than assuming we know which addresses we can steal.
   NB: This may reduce the amount of RAM the kernel reports you as having if
       you are leaving large temporary allocations made by U-Boot allocated
       when starting FreeBSD.
o) Add a port of the Cavium-provided Ethernet driver for Linux.  This changes
   Ethernet interface naming from rgmxN to octeN.  The new driver has vast
   improvements over the old one, both in performance and functionality, but
   does still have some features which have not been ported entirely and there
   may be unimplemented code that can be hit in everyday use.  I will make
   every effort to correct those as they are reported.
o) Support loading the kernel on non-contiguous cores.
o) Add very conservative support for harvesting randomness from the Octeon
   random number device.
o) Turn SMP on by default.
o) Clean up the style of the Octeon kernel configurations a little and make
   them compile with -march=octeon.
o) Add support for the Lanner MR320 and the CAPK-0100nd to the Simple
   Executive.
o) Modify the Simple Executive to build on FreeBSD and to build without
   executive-config.h or cvmx-config.h.  In the future we may want to
   revert part of these changes and supply executive-config.h and
   cvmx-config.h and access to the options contained in those files via
   kernel configuration files.
o) Modify the Simple Executive USB routines to support getting and setting
   of the USB PID.
2010-07-20 19:25:11 +00:00
Warner Losh
a3a61c6ab4 Temp hack to N32 kernel: turn off debugger since n32 is too weird for ddb 2010-07-13 22:27:19 +00:00
Jayachandran C.
9132d3f5b0 Fix XLR64, the previous version had the contents of file duplicated. 2010-07-08 16:11:06 +00:00
Jayachandran C.
d580a6708b 64 bit ld script for mips, and configuration file for 64 bit compilation
on XLR

Approved by:	rrs
2010-07-08 16:06:58 +00:00
Jayachandran C.
4fddb8ed6f Add linker script and configuration file for n32 kernel.
Approved by:	rrs (mentor)
2010-06-24 10:14:31 +00:00
Randall Stewart
4542827d4d This pushes all of JC's patches that I have in place. I
am now able to run 32 cores ok.. but I still will hang
on buildworld with a NFS problem. I suspect I am missing
a patch for the netlogic rge driver.

JC check and see if I am missing anything except your
core-mask changes

Obtained from:	JC
2010-05-16 19:43:48 +00:00
Warner Losh
a932985f50 Enable AH_RXCFG_SDMAMW_4BYTES option. See NOTES file for why this is
workaround (WAR) is needed.
2010-05-01 16:39:46 +00:00
Warner Losh
7e005410db Put the -current debugging options back into AR71XX. 2010-05-01 16:38:40 +00:00
Juli Mallett
38f836dbb3 o) Remove default MAXMEM on SWARM; pmap can readily use lmem for >512M
physical addresses.
o) Set a local maxmem in sb_machdep.c to avoid trying to use pages over 2^64
   under 32-bit ABIs.  Our pmap needs corrected to use vm_paddr_t consistently,
   then we can make vm_paddr_t 64-bit under 32-bit ABIs and add code in pmap
   to limit phys_avail by the maximum PFN that a 32-bit PTE can hold.
2010-04-23 19:20:56 +00:00
Andrew Thompson
b850ecc180 Change USB_DEBUG to #ifdef and allow it to be turned off. Previously this had
the illusion of a tunable setting but was always turned on regardless.

MFC after:	1 week
2010-04-22 21:31:34 +00:00
Juli Mallett
a97a1ee3d9 o) Back out my previous change to SWARM; some of it was to address an issue
that turned out to be unrelated, and the rest was, as pointed out by Neel,
   just wrong-headed.
o) Tweak mem.c to fix use of /dev/kmem for direct-mapped addresses.
2010-04-17 01:49:50 +00:00
Juli Mallett
4e859425ae Set KERNLOADADDR and TARGET_BIG_ENDIAN for SWARM. 2010-04-16 23:42:19 +00:00
Warner Losh
cd1c19dd7b Enable module builds now that the build completes for them. This
should get them into the universe rotation.
2010-03-29 22:03:55 +00:00
Warner Losh
560da96e36 Go ahead and add USB support to the generic config. 2010-03-14 19:04:42 +00:00
Juli Mallett
56c96c364e Add bpf and random to Octeon configurations, since they're needed to run
dhclient and ssh respectively.

Reviewed by:	imp
2010-03-11 22:29:45 +00:00
Neel Natu
40e359dc3a Get rid of unused options: KERNPHYSADDR, KERNVIRTADDR, PHYSADDR, PHYS_ADDR_64BIT
Discussed with: gonzo, imp
2010-02-20 06:39:14 +00:00
Attilio Rao
c1210a7d97 Adjust style (following the already existing rules) for the newly
introduced option DEADLKRES.

Reported by:	danfe, julian, avg
2010-02-15 23:44:48 +00:00
Neel Natu
9dcae110dc Remove the PCI_IOSPACE_SIZE and PCI_IOSPACE_ADDR hack from nexus.c. Implement
this in the Sibyte PCI hostbridge driver instead.

The nexus driver sees resource allocation requests for memory and irq
resources only. These are legitimate resources on all MIPS platforms.

Suggested by: imp
2010-02-12 02:59:49 +00:00
Attilio Rao
88cbfa852e Add the options DEADLKRES (introducing the deadlock resolver thread) in
the 'debugging' section of any HEAD kernel and enable for the mainstream
ones, excluding the embedded architectures.
It may, of course, enabled on a case-by-case basis.

Sponsored by:	Sandvine Incorporated
Requested by:	emaste
Discussed with:	kib
2010-02-10 16:30:04 +00:00
Neel Natu
1d4fd9f5a8 SMP support for the mips port.
The platform that supports SMP currently is a SWARM with a dual-core Sibyte
processor. The kernel config file to use is SWARM_SMP.

Reviewed by: imp, rrs
2010-02-09 06:24:43 +00:00
Neel Natu
93db1e020b Compile SWARM with KTRACE support. 2010-02-04 06:44:42 +00:00
Olivier Houchard
7bb6393c4f Comment out any reference to ALCHEMY.hints until it's committed, to unbreak
make universe.

Spotted out by:	gahr
2010-01-28 14:59:16 +00:00
Warner Losh
1e027851aa Make a note that this file is the 64-bit version and experimental and
point people at the OCTEON1-32 file instead.
2010-01-27 16:21:32 +00:00
Warner Losh
44b945c904 Move back to physical address 0x01000000. 0x00100000 seems to have
problems sometimes for reasons I haven't tracked down.
2010-01-27 16:15:19 +00:00
Randall Stewart
92a480b916 My current conf, that comes up but
locks up in make buildworld.

You need to follow the mips wiki for building
the nfs partition and setup things to mount there
(in the conf and in your bootp setup).
2010-01-26 05:17:03 +00:00
Warner Losh
69012f649d Fix device name for root....
Indent rgmii correctly.
Remove stale comments.
2010-01-25 16:55:31 +00:00
Oleksandr Tymoshenko
61b1ecf6d3 - Add driver for PCF2123, SPI real time clock/calendar 2010-01-22 22:14:12 +00:00
Warner Losh
659dfb46f1 Remove some irrelevant commented out make options. 2010-01-22 20:42:18 +00:00
Warner Losh
54880c18b4 make note of the nonsensical nature of the values in this hints file. 2010-01-22 20:41:43 +00:00
John Baldwin
13c18821fa Move the examples for the 'hints' and 'env' keywords from various GENERIC
kernel configs into NOTES.

Reviewed by:	imp
2010-01-19 17:20:34 +00:00
Warner Losh
e78e34c963 Place proper svn:keywords tag on all these files. They were created
somehow without them on projects/mips, and that mistake was propigated
over to head.

Submitted by:	rpaulo@
2010-01-12 21:17:36 +00:00
Rui Paulo
ac20bf57a9 Add a regular comment explaining what this file is. 2010-01-12 20:55:12 +00:00
Rui Paulo
9dfb2a64ad Fix svn properties and remove a P4 keyword. 2010-01-12 20:52:41 +00:00
Warner Losh
e93f9d43a8 Cope with the octeon1->cavium move. 2010-01-11 04:40:38 +00:00
Warner Losh
f493c5e372 Merge from projects/mips to head by hand:
I think these are the relevant changes, but definitely are a superset
of them.  Software archaeologists are invited to check the branch
itself for the details.

r199695 | imp | 2009-11-23 00:49:50 -0700 (Mon, 23 Nov 2009) | 2 lines
Specify loader script and load address

r198263 | neel | 2009-10-19 22:31:20 -0600 (Mon, 19 Oct 2009) | 7 lines
The default KERNLOADADDR does not work on MALTA hardware. On my platform the
"First free SDRAM address" reported by YAMON is 0x800b6e61.
So use a conservative KERNLOADADDR of 0x80100000.
Approved by: imp (mentor)

r194163 | imp | 2009-06-14 00:12:21 -0600 (Sun, 14 Jun 2009) | 2 lines
Kludge: pretend to be ISA_MIPS32 for the moment.

r192864 | gonzo | 2009-05-26 16:40:12 -0600 (Tue, 26 May 2009) | 4 lines
- Replace CPU_NOFPU and SOFTFLOAT options with CPU_FPU. By default
   we assume that there is no FPU, because majority of SoC does
   not have it.

r187461 | gonzo | 2009-01-19 21:24:03 -0700 (Mon, 19 Jan 2009) | 3 lines
- KERNLOADADDR should be defined with makeoption.
    Redboot loads kernel now

r187418 | gonzo | 2009-01-18 19:37:10 -0700 (Sun, 18 Jan 2009) | 4 lines
- Add trampoline stuff for bootloaders that do not support ELF
- Replace arm'ish KERNPHYSADDR/KERNVIRTADDR with
    KERNLOADADDR/TRAMPLOADADDR and clean configs
2010-01-10 20:03:16 +00:00
Warner Losh
d0f655c263 Merge from projects/mips to head by hand:
ALCHEMY config file.
2010-01-10 19:54:18 +00:00
Warner Losh
ffc186bc8c Merge from projects/mips to head by hand:
Copy over MALTA64, the 64-bit varianat of the malta board...
2010-01-09 18:19:31 +00:00
Warner Losh
6a9254300c Merge from projects/mips to head by hand:
Copy over XLR kernel config file.
2010-01-09 18:17:39 +00:00
Warner Losh
00152147ef Merge from projects/mips to head by hand:
Copy over the OCTEON1 kernel config file.   This is the 64-bit version.
2010-01-09 18:15:28 +00:00
Warner Losh
48d3352bfa Merge from projects/mips to head by hand:
Copy over OCTEON1.hints file.
2010-01-09 18:14:27 +00:00
Warner Losh
55f6b015ea Merge from projects/mips to head by hand:
Copy over OCTEON1-32 file: the 32-bit variant of the octeon kernel
config file.
2010-01-09 18:13:13 +00:00
Warner Losh
4d1442a381 Merge from projects/mips to head by hand:
Copy over AR71XX.hints file.
2010-01-09 18:11:45 +00:00
Warner Losh
41d06da412 Merge from projects/mips to head by hand:
Copy over the AR71XX config file.
2010-01-09 18:10:46 +00:00