Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/sbmips A basic port to the Broadcom/SiByte SB1250 e...



details:   https://anonhg.NetBSD.org/src/rev/5fd1bd9e7910
branches:  trunk
changeset: 523215:5fd1bd9e7910
user:      simonb <simonb%NetBSD.org@localhost>
date:      Wed Mar 06 02:13:37 2002 +0000

description:
A basic port to the Broadcom/SiByte SB1250 evaluation board (the
"swarm").  Other SB-cpu boards will be supported by this port in
the future.

Includes support for on-chip ethernet and serial.  Many features
still missing - notably SMP, PCI/LDT and IDE.

This code is provided by the Broadband Processor Business Unit at
Broadcom Corp with minor updates by me.

diffstat:

 sys/arch/sbmips/Makefile                 |    5 +
 sys/arch/sbmips/TODO                     |   67 +++
 sys/arch/sbmips/compile/.keep_me         |    3 +
 sys/arch/sbmips/conf/GENERIC             |  158 +++++++
 sys/arch/sbmips/conf/Makefile.sbmips.inc |    5 +
 sys/arch/sbmips/conf/files.sbmips        |  138 ++++++
 sys/arch/sbmips/conf/std.sbmips          |   13 +
 sys/arch/sbmips/include/Makefile         |   18 +
 sys/arch/sbmips/include/ansi.h           |    3 +
 sys/arch/sbmips/include/aout_machdep.h   |    3 +
 sys/arch/sbmips/include/asm.h            |    3 +
 sys/arch/sbmips/include/autoconf.h       |   63 +++
 sys/arch/sbmips/include/bsd-aout.h       |    3 +
 sys/arch/sbmips/include/bswap.h          |    3 +
 sys/arch/sbmips/include/cdefs.h          |    5 +
 sys/arch/sbmips/include/conf.h           |    3 +
 sys/arch/sbmips/include/cpu.h            |    3 +
 sys/arch/sbmips/include/db_machdep.h     |    6 +
 sys/arch/sbmips/include/disklabel.h      |  175 ++++++++
 sys/arch/sbmips/include/elf_machdep.h    |   11 +
 sys/arch/sbmips/include/endian.h         |    3 +
 sys/arch/sbmips/include/endian_machdep.h |   11 +
 sys/arch/sbmips/include/float.h          |    3 +
 sys/arch/sbmips/include/ieee.h           |    3 +
 sys/arch/sbmips/include/ieeefp.h         |    3 +
 sys/arch/sbmips/include/int_const.h      |    3 +
 sys/arch/sbmips/include/int_fmtio.h      |    3 +
 sys/arch/sbmips/include/int_limits.h     |    3 +
 sys/arch/sbmips/include/int_mwgwtypes.h  |    3 +
 sys/arch/sbmips/include/int_types.h      |    3 +
 sys/arch/sbmips/include/intr.h           |  104 +++++
 sys/arch/sbmips/include/kcore.h          |    3 +
 sys/arch/sbmips/include/kdbparam.h       |    3 +
 sys/arch/sbmips/include/leds.h           |   39 +
 sys/arch/sbmips/include/limits.h         |    3 +
 sys/arch/sbmips/include/lock.h           |    4 +
 sys/arch/sbmips/include/locore.h         |    3 +
 sys/arch/sbmips/include/math.h           |    3 +
 sys/arch/sbmips/include/mips_opcode.h    |    3 +
 sys/arch/sbmips/include/param.h          |  110 +++++
 sys/arch/sbmips/include/pcb.h            |    3 +
 sys/arch/sbmips/include/pmap.h           |   12 +
 sys/arch/sbmips/include/proc.h           |    3 +
 sys/arch/sbmips/include/profile.h        |    3 +
 sys/arch/sbmips/include/psl.h            |    3 +
 sys/arch/sbmips/include/pte.h            |    3 +
 sys/arch/sbmips/include/ptrace.h         |    3 +
 sys/arch/sbmips/include/reg.h            |    3 +
 sys/arch/sbmips/include/regdef.h         |    3 +
 sys/arch/sbmips/include/regnum.h         |    3 +
 sys/arch/sbmips/include/reloc.h          |    3 +
 sys/arch/sbmips/include/rnd.h            |    3 +
 sys/arch/sbmips/include/setjmp.h         |    3 +
 sys/arch/sbmips/include/signal.h         |    3 +
 sys/arch/sbmips/include/stdarg.h         |    3 +
 sys/arch/sbmips/include/systemsw.h       |   72 +++
 sys/arch/sbmips/include/trap.h           |    3 +
 sys/arch/sbmips/include/types.h          |    5 +
 sys/arch/sbmips/include/varargs.h        |    3 +
 sys/arch/sbmips/include/vmparam.h        |    9 +
 sys/arch/sbmips/sbmips/autoconf.c        |   85 ++++
 sys/arch/sbmips/sbmips/conf.c            |  481 +++++++++++++++++++++++
 sys/arch/sbmips/sbmips/console.c         |   69 +++
 sys/arch/sbmips/sbmips/cpu.c             |   92 ++++
 sys/arch/sbmips/sbmips/disksubr.c        |  455 ++++++++++++++++++++++
 sys/arch/sbmips/sbmips/locore_machdep.S  |   20 +
 sys/arch/sbmips/sbmips/machdep.c         |  623 +++++++++++++++++++++++++++++++
 sys/arch/sbmips/sbmips/sb1250_icu.c      |  205 ++++++++++
 sys/arch/sbmips/sbmips/softintr.c        |  210 ++++++++++
 sys/arch/sbmips/sbmips/systemsw.c        |  189 +++++++++
 sys/arch/sbmips/sbmips/zbbus.c           |  136 ++++++
 71 files changed, 3712 insertions(+), 0 deletions(-)

diffs (truncated from 3996 to 300 lines):

diff -r a60674f75db4 -r 5fd1bd9e7910 sys/arch/sbmips/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/sbmips/Makefile  Wed Mar 06 02:13:37 2002 +0000
@@ -0,0 +1,5 @@
+# $NetBSD: Makefile,v 1.1 2002/03/06 02:13:37 simonb Exp $
+
+SUBDIR=        include
+
+.include <bsd.subdir.mk>
diff -r a60674f75db4 -r 5fd1bd9e7910 sys/arch/sbmips/TODO
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/sbmips/TODO      Wed Mar 06 02:13:37 2002 +0000
@@ -0,0 +1,67 @@
+$NetBSD: TODO,v 1.1 2002/03/06 02:13:37 simonb Exp $
+
+NetBSD/sbmips to-do list
+
+
+REALLY REALLY SHOULD ("MUST") BE DONE BEFORE INTEGRATION INTO NetBSD:
+
+       * pass1 workarounds code should be removed (i.e. not put into
+         public libc). 
+
+         NOTE- no pass1 workarounds are in libc or the toolchain.
+         Remove the pass1 workarounds in the kernel at some future stage?
+
+
+SHOULD BE DONE BEFORE INTEGRATION INTO NetBSD:
+
+       * redo the softintr code.  it's fairly icky.
+
+       * clean as many changes off of 'stand' as possible.  the files
+         in there were the most part derived from other ports (alpha
+         and followers of that style of boot block).
+
+         NOTE- 'stand' has not been imported to the NetBSD source tree
+         yet.
+
+General features needed:
+
+       * SMP
+
+       * bus.h support.
+
+       * pci/ldt support (requires bus.h support).
+
+       * ide on generic bus (requires bus.h support).
+
+       * generic smbus support, and support for our controller.
+
+               * TOD clock on smbus.
+
+       * board-level configuration details.
+
+               * swarm LEDs.
+
+               * MAC vs. fifo
+
+               * sync serial vs. duart.
+
+       * fifo driver.
+
+       * sync serial driver.
+
+
+Cleanups / Improvements:
+
+       * mips cache code / pmap for coherent system.
+
+       * sb-1 cache error handler.
+
+       * clean up ethernet driver & tune.
+
+       * interrupt handling/routing.
+
+       * systemsw bits should be made more generic.  possibly apply to
+         mips.
+
+       * sbscn should be made split into a driver per channel, w/
+         the features for which that's not possible in pass1 disabled.
diff -r a60674f75db4 -r 5fd1bd9e7910 sys/arch/sbmips/compile/.keep_me
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/sbmips/compile/.keep_me  Wed Mar 06 02:13:37 2002 +0000
@@ -0,0 +1,3 @@
+$NetBSD: .keep_me,v 1.1 2002/03/06 02:13:38 simonb Exp $
+
+This normally empty directory needs to be kept in the distribution.
diff -r a60674f75db4 -r 5fd1bd9e7910 sys/arch/sbmips/conf/GENERIC
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/sbmips/conf/GENERIC      Wed Mar 06 02:13:37 2002 +0000
@@ -0,0 +1,158 @@
+# $NetBSD: GENERIC,v 1.1 2002/03/06 02:13:38 simonb Exp $
+
+include        "arch/sbmips/conf/std.sbmips"
+
+#ident                 "GENERIC-$Revision: 1.1 $"
+
+# The following three options are required for BCM1250 pass 1 silicon
+options        SB1250_PASS1
+options        NOFPU
+options        SOFTFLOAT
+
+maxusers       32
+
+# Standard system options
+options        KTRACE          # system call tracing support
+options        SYSVMSG         # System V message queues
+options        SYSVSEM         # System V semaphores
+options        SYSVSHM         # System V shared memory
+#options       SHMMAXPGS=1024  # 1024 pages is the default
+options        LKM             # loadable kernel modules
+#options       NTP             # network time protocol
+#options       UCONSOLE        # users can redirect console (unsafe)
+
+# Debugging options
+options        DIAGNOSTIC      # extra kernel sanity checking
+#options       DEBUG           # extra kernel debugging support
+#options       KMEMSTATS       # kernel memory statistics (vmstat -m)
+options        DDB             # kernel dynamic debugger
+options        DDB_HISTORY_SIZE=100 # enable history editing in DDB
+#makeoptions   DEBUG="-g"      # compile full symbol table
+options        SYMTAB_SPACE=200000     # size for embedded symbol table
+
+# Compatibility options
+options        COMPAT_43       # compatibility with 4.3BSD binaries
+#options       COMPAT_10       # NetBSD 0.9 binary compatibility
+#options       COMPAT_10       # NetBSD 1.0 binary compatibility
+#options       COMPAT_11       # NetBSD 1.1 binary compatibility
+#options       COMPAT_12       # NetBSD 1.2 binary compatibility
+#options       COMPAT_13       # NetBSD 1.3 binary compatibility
+#options       COMPAT_14       # NetBSD 1.4 binary compatibility
+#options       EXEC_ECOFF      # exec ECOFF binaries
+#options       COMPAT_ULTRIX   # binary compatibility with Ultrix
+
+# File systems
+file-system    FFS             # Berkeley Fast Filesystem
+file-system    NFS             # Sun NFS-compatible filesystem client
+file-system    KERNFS          # kernel data-structure filesystem
+#file-system   NULLFS          # NULL layered filesystem
+file-system    OVERLAY         # overlay file system
+file-system    MFS             # memory-based filesystem
+file-system    FDESC           # user file descriptor filesystem
+#file-system   UMAPFS          # uid/gid remapping filesystem
+file-system    LFS             # Log-based filesystem (still experimental)
+#file-system   PORTAL          # portal filesystem (still experimental)
+#file-system   PROCFS          # /proc
+#file-system   CD9660          # ISO 9660 + Rock Ridge file system
+#file-system   UNION           # union file system
+#file-system   MSDOSFS         # MS-DOS FAT filesystem(s).
+#file-system   CODA            # Coda File System; also needs vcoda (below)
+
+# File system options
+options        NFSSERVER       # Sun NFS-compatible filesystem server
+options        QUOTA           # FFS quotas
+#options       FFS_EI          # FFS Endian Independant support
+#options       SOFTDEP         # FFS soft updates support.
+#options       EXT2FS_SYSTEM_FLAGS # makes ext2fs file flags (append and
+                               # immutable) behave as system flags.
+
+# Networking options
+#options       GATEWAY         # IP packet forwarding
+options        INET            # Internet protocols
+options        INET6           # IPV6
+#options       IPSEC           # IP security
+#options       IPSEC_ESP       # IP security (encryption part; define w/IPSEC)
+#options       IPSEC_DEBUG     # debug for IP security
+#options       MROUTING        # packet forwarding of multicast packets
+#options       NS              # Xerox NS networking
+#options       NSIP            # Xerox NS tunneling over IP
+#options       ISO,TPIP        # OSI networking
+#options       EON             # OSI tunneling over IP
+#options       CCITT,LLC,HDLC  # X.25
+#options       NETATALK        # AppleTalk (over Ethernet) protocol
+#options       PPP_BSDCOMP     # BSD-Compress compression support for PPP
+#options       PPP_DEFLATE     # Deflate compression support for PPP
+options        PPP_FILTER      # Active filter support for PPP (requires bpf)
+options        PFIL_HOOKS      # pfil(9) packet filter hooks
+options        IPFILTER_LOG    # ipmon(8) log support
+
+# Compatibility with 4.2BSD implementation of TCP/IP.  Not recommended.
+#options       TCP_COMPAT_42
+
+# These options enable verbose messages for several subsystems.
+# Warning, these may compile large string tables into the kernel!
+options        PCIVERBOSE      # verbose PCI device autoconfig messages
+#options       PCI_CONFIG_DUMP # verbosely dump PCI config space
+#options       SCSIVERBOSE     # human readable SCSI error messages
+options        MIIVERBOSE      # verbose PHY autoconfig messages
+
+options        NFS_BOOT_DHCP
+
+#config                netbsd  root on ? type ?
+config         netbsd  root on sbmac0 type nfs
+
+zbbus*         at root
+
+cpu0           at zbbus? busid 0
+#cpu*          at zbbus? busid ?
+sbscd*         at zbbus? busid ?
+sbobio*                at zbbus? busid ?
+
+#sbicu*                at sbscd? offset ?
+#sbwdog*       at sbscd? offset ? intr ?
+sbtimer0       at sbscd? offset ? intr ? flags 0x01            # clock
+#sbtimer1      at sbscd? offset ? intr ? flags 0x02            # statclock
+sbtimer*       at sbscd? offset ? intr ?
+
+sbmac*         at sbobio? offset ?
+sbscn*         at sbobio? offset ?
+#sbgbus*       at sbobio? offset ?
+
+# MII/PHY support
+brgphy*        at mii? phy ?
+
+# Pseudo-devices
+
+# Disk/mass storage pseudo-devices
+pseudo-device  ccd             4       # concatenated disk devices
+#pseudo-device raid            4       # RAIDframe disk driver
+#options       RAID_AUTOCONFIG         # auto-configuration of RAID
+pseudo-device  md              1       # memory disk device (ramdisk)
+pseudo-device  vnd             4       # disk-like interface to files
+
+# Network pseudo-devices
+pseudo-device  bpfilter        8       # Berkeley packet filter
+pseudo-device  ipfilter                # IP filter (firewall) and NAT
+pseudo-device  loop                    # network loopback
+#pseudo-device ppp             2       # Point-to-Point Protocol
+#pseudo-device pppoe                   # PPP over Ethernet (RFC 2516)
+#pseudo-device sl              2       # Serial Line IP
+#pseudo-device strip           2       # Starmode Radio IP (Metricom)
+#pseudo-device irframetty              # IrDA frame line discipline
+#pseudo-device tun             2       # network tunneling over tty
+#pseudo-device gre             2       # generic L3 over IP tunnel
+#pseudo-device ipip            2       # RFC 2003 IP Encapsulation
+#pseudo-device gif             4       # RFC1933 tunnel
+#pseudo-device faith           1       # IPv[46] tcp relay translation
+#pseudo-device stf             1       # 6to4 IPv6 over IPv4 encapsulation
+pseudo-device  vlan                    # IEEE 802.1q encapsulation
+pseudo-device  bridge                  # simple inter-network bridging
+
+# Miscellaneous pseudo-devices
+pseudo-device  pty                     # pseudo-terminals
+#pseudo-device tb              1       # tablet line discipline
+#pseudo-device sequencer       1       # MIDI sequencer
+pseudo-device  rnd                     # /dev/random & kernel generator
+
+# A pseudo device needed for Coda      # also needs CODA (above)
+#pseudo-device vcoda           4       # coda minicache <-> venus comm.
diff -r a60674f75db4 -r 5fd1bd9e7910 sys/arch/sbmips/conf/Makefile.sbmips.inc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/sbmips/conf/Makefile.sbmips.inc  Wed Mar 06 02:13:37 2002 +0000
@@ -0,0 +1,5 @@
+#      $NetBSD: Makefile.sbmips.inc,v 1.1 2002/03/06 02:13:38 simonb Exp $
+
+SYSTEM_LD_TAIL_EXTRA=; \
+       echo "${DBSYM} $@ || true"; \
+       ${DBSYM} $@ || true;
diff -r a60674f75db4 -r 5fd1bd9e7910 sys/arch/sbmips/conf/files.sbmips
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/sbmips/conf/files.sbmips Wed Mar 06 02:13:37 2002 +0000
@@ -0,0 +1,138 @@
+# $NetBSD: files.sbmips,v 1.1 2002/03/06 02:13:39 simonb Exp $
+
+maxpartitions 8
+
+maxusers 1 8 64
+
+file arch/sbmips/sbmips/autoconf.c
+file arch/sbmips/sbmips/machdep.c
+file arch/sbmips/sbmips/softintr.c
+file arch/sbmips/sbmips/console.c
+file arch/sbmips/sbmips/conf.c
+file arch/sbmips/sbmips/disksubr.c
+file arch/sbmips/sbmips/systemsw.c
+file dev/clock_subr.c
+file dev/cons.c
+
+file arch/sbmips/sbmips/sb1250_icu.c   !ikos
+
+file arch/sbmips/ikos/ikos_clock.c     ikos
+file arch/sbmips/ikos/ikos_icu.c       ikos
+file arch/sbmips/ikos/ikoscons.c       ikos
+
+file arch/mips/cfe/cfe_api.c
+
+
+###
+### MI device inclusion
+###
+# Machine-independent MII/PHY drivers.
+include "dev/mii/files.mii"
+
+# Machine-independent I2O drivers.
+include "dev/i2o/files.i2o"
+
+# Machine-independent SCSI drivers
+include "dev/scsipi/files.scsipi"
+major  { sd = 8 }
+major  { cd = 3 }



Home | Main Index | Thread Index | Old Index