Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/evbmips Add loongson support to evbmips, based on t...



details:   https://anonhg.NetBSD.org/src/rev/da7620c23838
branches:  trunk
changeset: 768778:da7620c23838
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Sat Aug 27 13:42:44 2011 +0000

description:
Add loongson support to evbmips, based on the OpenBSD loongson port
and the existing evbmips/gdium support.
This has been tested on a lemote fuloong device (boots multiuser),
should also support other lemote devices (maybe with minor adjustments,
or adding missing drivers). There is some gdium support here too, but it
may not be yet complete (someone with a gdium would need to have a look,
hi macallan@ :)
loongson kernels are 64bits only: the loongson2f has ressources located
above the 2Gb physical address, and it's much easier to access it
using XKPHYS than trying to make it fit in the limited 32bit kernel
virtual space.

diffstat:

 sys/arch/evbmips/conf/LOONGSON                |  335 +++++++++
 sys/arch/evbmips/conf/files.loongson          |  104 ++
 sys/arch/evbmips/conf/std.loongson            |   31 +
 sys/arch/evbmips/loongson/autoconf.c          |  134 +++
 sys/arch/evbmips/loongson/autoconf.h          |  107 ++
 sys/arch/evbmips/loongson/bonito_mainbus.c    |   97 ++
 sys/arch/evbmips/loongson/dev/gcscpcib_pci.c  |  108 ++
 sys/arch/evbmips/loongson/dev/glx.c           |  940 ++++++++++++++++++++++++++
 sys/arch/evbmips/loongson/dev/glxreg.h        |  378 ++++++++++
 sys/arch/evbmips/loongson/dev/glxvar.h        |   22 +
 sys/arch/evbmips/loongson/dev/kb3310.c        |  552 +++++++++++++++
 sys/arch/evbmips/loongson/dev/kb3310var.h     |   24 +
 sys/arch/evbmips/loongson/dev/pcib.c          |  175 ++++
 sys/arch/evbmips/loongson/dev/pcibvar.h       |   41 +
 sys/arch/evbmips/loongson/gdium_machdep.c     |  292 ++++++++
 sys/arch/evbmips/loongson/generic2e_machdep.c |  621 +++++++++++++++++
 sys/arch/evbmips/loongson/isa_machdep.c       |   90 ++
 sys/arch/evbmips/loongson/loongson2_machdep.c |  330 +++++++++
 sys/arch/evbmips/loongson/loongson_bus_defs.h |   19 +
 sys/arch/evbmips/loongson/loongson_bus_io.c   |   67 +
 sys/arch/evbmips/loongson/loongson_bus_mem.c  |   85 ++
 sys/arch/evbmips/loongson/loongson_intr.c     |  341 +++++++++
 sys/arch/evbmips/loongson/loongson_intr.h     |   79 ++
 sys/arch/evbmips/loongson/loongson_isa.h      |   28 +
 sys/arch/evbmips/loongson/machdep.c           |  772 +++++++++++++++++++++
 sys/arch/evbmips/loongson/mainbus.c           |  134 +++
 sys/arch/evbmips/loongson/yeeloong_machdep.c  |  591 ++++++++++++++++
 27 files changed, 6497 insertions(+), 0 deletions(-)

diffs (truncated from 6605 to 300 lines):

diff -r d8122672b6a2 -r da7620c23838 sys/arch/evbmips/conf/LOONGSON
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/evbmips/conf/LOONGSON    Sat Aug 27 13:42:44 2011 +0000
@@ -0,0 +1,335 @@
+# $NetBSD: LOONGSON,v 1.1 2011/08/27 13:42:44 bouyer Exp $
+#
+# LOONGSON machine description file
+# 
+# This machine description file is used to generate the default NetBSD
+# kernel.  The generic kernel does not include all options, subsystems
+# and device drivers, but should be useful for most applications.
+#
+# The machine description file can be customised for your specific
+# machine to reduce the kernel size and improve its performance.
+#
+# For further information on compiling NetBSD kernels, see the config(8)
+# man page.
+#
+# For further information on hardware support for this architecture, see
+# the intro(4) man page.  For further information about kernel options
+# for this architecture, see the options(4) man page.  For an explanation
+# of each device driver in this file see the section 4 man page for the
+# device.
+
+include                "arch/evbmips/conf/std.loongson"
+
+options        INCLUDE_CONFIG_FILE     # embed config file in kernel binary
+
+#ident                 "GDIUM-$Revision: 1.1 $"
+
+maxusers       16
+
+# Standard system options
+options        DDB                     # in-kernel debugger
+#options       DDB_ONPANIC=0           # don't enter debugger on panic
+options        DDB_HISTORY_SIZE=512    # enable history editing in DDB
+#options       KGDB                    # remote debugger
+options        DIAGNOSTIC              # extra kernel debugging checks
+#options       DEBUG                   # extra kernel debugging support
+#options       PMAP_FAULTINFO
+#options       LOCKDEBUG
+makeoptions    DEBUG="-g"
+options        KTRACE                  # system call tracing support
+options        MSGBUFSIZE=8192         # dmesg buffer size
+
+## UVM options.
+#options       UVM_PAGE_TRKOWN
+#options       UVMHIST
+#options       UVMHIST_PRINT   # Loud!
+
+#options       SCSIVERBOSE             # human readable SCSI error messages
+#options       PCMCIAVERBOSE           # verbose PCMCIA configuration messages
+#options       PCMCIADEBUG
+#options       PCMCIACISDEBUG
+
+#options       RTC_OFFSET=0    # hardware clock is this many mins. west of GMT
+#options       RTC_OFFSET=-540         # JST-9
+#options       RTC_OFFSET=480          # PST8
+                                       # In NO RTC_OFFSET , inherit RTC_OFFSET
+                                       # from Windows CE.
+options        NTP                     # network time protocol
+
+#options       WINCE_DEFAULT_SETTING   # Debugging use
+
+#options       SYSCALL_DEBUG           # for debug
+#options       HPCMIPS_L1CACHE_DISABLE # disable L1 cache for debug
+options        USERCONF                # userconf(4) support
+#options       PIPE_SOCKETPAIR         # smaller, but slower pipe(2)
+options        SYSCTL_INCLUDE_DESCR    # Include sysctl descriptions in kernel
+
+# Filesystem options
+file-system    FFS             # fast filesystem with user and group quotas
+file-system    MFS             # memory-based filesystem
+file-system    NFS             # Sun NFS-compatible filesystem (client)
+file-system    EXT2FS          # second extended file system (linux)
+#file-system   LFS             # Log-based filesystem (still experimental)
+file-system    CD9660          # ISO 9660 + Rock Ridge file system
+file-system    MSDOSFS         # MS-DOS file system
+#file-system   FDESC           # /dev/fd
+file-system    KERNFS          # /kern (kernel informational filesystem)
+#file-system   NULLFS          # loopback file system
+#file-system   OVERLAY         # overlay file system
+file-system    PROCFS          # /proc
+#file-system   UMAPFS          # NULLFS + uid and gid remapping
+file-system    UNION
+file-system    PTYFS           # /dev/pts/N support
+#file-system   TMPFS           # Efficient memory file-system
+#file-system   UDF             # experimental - OSTA UDF CD/DVD file-system
+
+options        NFSSERVER       # Sun NFS-compatible filesystem (server)
+options        WAPBL           # File system journaling support - Experimental
+#options       UFS_DIRHASH     # UFS Large Directory Hashing - Experimental
+#options       QUOTA           # legacy UFS quotas
+#options       QUOTA2          # new, in-filesystem UFS quotas
+#options       FFS_NO_SNAPSHOT # No FFS snapshot support
+
+# Networking options
+#options       GATEWAY         # IP packet forwarding
+options        INET            # IP + ICMP + TCP + UDP
+options        INET6           # IPV6
+#options       IPSEC           # IP security
+#options       IPSEC_ESP       # IP security (encryption part; define w/ IPSEC)
+#options       IPSEC_NAT_T     # IPsec NAT traversal (NAT-T)
+#options       IPSEC_DEBUG     # debug for IP security
+#options       MROUTING        # Multicast routing support
+#options       PIM             # Protocol Independent Multicast
+#options       ISO             # OSI networking
+#options       TPIP            # TPIP
+#options       EON             # OSI tunneling over IP
+options        PFIL_HOOKS      # pfil(9) packet filter hooks
+options        IPFILTER_LOG    # ipmon(8) log support
+options        IPFILTER_LOOKUP # ippool(8) support
+options        IPFILTER_COMPAT # Compat for IP-Filter
+#options       IPFILTER_DEFAULT_BLOCK  # block all packets by default
+
+#options       ALTQ            # Manipulate network interfaces' output queues
+#options       ALTQ_BLUE       # Stochastic Fair Blue
+#options       ALTQ_CBQ        # Class-Based Queueing
+#options       ALTQ_CDNR       # Diffserv Traffic Conditioner
+#options       ALTQ_FIFOQ      # First-In First-Out Queue
+#options       ALTQ_FLOWVALVE  # RED/flow-valve (red-penalty-box)
+#options       ALTQ_HFSC       # Hierarchical Fair Service Curve
+#options       ALTQ_LOCALQ     # Local queueing discipline
+#options       ALTQ_PRIQ       # Priority Queueing
+#options       ALTQ_RED        # Random Early Detection
+#options       ALTQ_RIO        # RED with IN/OUT
+#options       ALTQ_WFQ        # Weighted Fair Queueing
+
+# NetBSD backwards compatibility
+options        COMPAT_43
+options        COMPAT_16
+options        COMPAT_20
+options        COMPAT_30       # NetBSD 3.0 compatibility.
+options        COMPAT_40       # NetBSD 4.0 compatibility.
+options        COMPAT_50       # NetBSD 5.0 compatibility.
+options                COMPAT_BSDPTY   # /dev/[pt]ty?? ptys.
+
+
+#options       NFS_BOOT_DHCP
+options        NFS_BOOT_BOOTP
+#options       NFS_BOOT_BOOTPARAM
+
+# compile options
+#makeoptions   DEFGP="-G 10"
+
+config         netbsd          root on ? type ?
+
+# WS console uses SUN or VT100 terminal emulation
+options        WSEMUL_VT100
+#options       WSDISPLAY_DEFAULTSCREENS=4
+options        FONT_GALLANT12x22
+# compatibility to other console drivers
+options        WSDISPLAY_COMPAT_RAWKBD         # can get raw scancodes
+#
+# Hpckbd will set key board layout appropriately. You can use option
+# 'PCKBD_LAYOUT' to overrite the default layout.
+#
+#options       PCKBD_LAYOUT="(KB_US | KB_SWAPCTRLCAPS | KB_MACHDEP)"
+
+mainbus0       at root
+cpu0           at mainbus0
+bonito0                at mainbus0
+pci0           at bonito0
+sisfb0         at pci0 dev ? function ?
+#X#voyagerfb0  at pci0 dev ? function ?
+#genfb0                at pci0 dev ? function ?
+wsdisplay*     at wsemuldisplaydev?
+ehci*          at pci0 dev ? function ?
+#options       EHCI_DEBUG
+ohci*          at pci0 dev ? function ?
+#options       OHCI_DEBUG, USB_DEBUG, UHUB_DEBUG
+
+gcscpcib* at pci? dev ? function ?     # AMD CS5535/CS5536 PCI-ISA w/
+gpio*   at gcscpcib?                   # timecounter, watchdog and GPIO
+isa0   at gcscpcib?
+
+pcib*  at pci?
+isa0   at pcib?
+
+mcclock*       at isa? port 0x70               # mc146818-compatible
+com0           at isa? port 0x2f8 irq 3        # Fuloong 2F only
+com1           at isa? port 0x3f8 irq 4        # Fuloong 2F only (IR port)
+
+pciide*        at pci? dev ? function ? flags 0x0000   # GENERIC pciide driver
+viaide*        at pci? dev ? function ?        # VIA/AMD/Nvidia IDE controllers
+
+# ATA (IDE) bus support
+atabus* at ata?
+options        ATADEBUG
+
+# IDE drives
+# Flags are used only with controllers that support DMA operations
+# and mode settings (e.g. some pciide controllers)
+# The lowest order four bits (rightmost digit) of the flags define the PIO
+# mode to use, the next set of four bits the DMA mode and the third set the
+# UltraDMA mode. For each set of four bits, the 3 lower bits define the mode
+# to use, and the last bit must be 1 for this setting to be used.
+# For DMA and UDMA, 0xf (1111) means 'disable'.
+# 0x0fac means 'use PIO mode 4, DMA mode 2, disable UltraDMA'.
+# (0xc=1100, 0xa=1010, 0xf=1111)
+# 0x0000 means "use whatever the drive claims to support".
+wd*    at atabus? drive ? flags 0x0000
+
+# ATAPI bus support
+#atapibus* at atapi?
+
+# ATAPI devices
+# flags have the same meaning as for IDE drives.
+#cd*   at atapibus? drive ? flags 0x0000       # ATAPI CD-ROM drives
+#sd*   at atapibus? drive ? flags 0x0000       # ATAPI disk drives
+#st*   at atapibus? drive ? flags 0x0000       # ATAPI tape drives
+#uk*   at atapibus? drive ? flags 0x0000       # ATAPI unknown
+
+ral*   at pci? dev ? function ?        # RL2561S 802.11b/g
+rtk*   at pci? dev ? function ?        # RTL8139 100/10 Ethernet
+re*    at pci? dev ? function ?        # Realtek 8139C+/8169/8169S/8110S
+# MII/PHY support
+rgephy*        at mii? phy ?                   # Realtek 8169S/8110S internal PHYs
+rlphy* at mii? phy ?                   # Realtek 8139/8201L PHYs
+ukphy* at mii? phy ?                   # generic unknown PHYs
+
+# USB Hubs
+usb*   at ehci?
+usb*   at ohci?
+uhub*  at usb?
+uhub*  at uhub? port ?
+
+# USB HID device
+uhidev*        at uhub? port ? configuration ? interface ?
+
+# USB Mice
+ums*           at uhidev? reportid ?
+wsmouse*       at ums? mux 0
+
+# USB Keyboards
+ukbd*  at uhidev? reportid ?
+wskbd* at ukbd? console ? mux 1
+
+# USB Generic HID devices
+uhid*  at uhidev? reportid ?
+
+# USB serial adapter
+uftdi* at uhub? port ? configuration ?
+
+# USB Printer
+ulpt*  at uhub? port ? configuration ? interface ?
+
+# USB Modem
+umodem*        at uhub? port ? configuration ?
+ucom*  at umodem?
+
+# Option N.V. Wireless WAN modems
+uhso*  at uhub? port ? configuration ?
+
+# USB Mass Storage
+umass* at uhub? port ? configuration ? interface ?
+scsibus*       at umass? channel ?
+sd*            at scsibus? target ? lun ?      # SCSI disk drives
+cd*            at scsibus? target ? lun ?      # SCSI CD-ROM drives
+
+# FTDI FT8U100AX serial adapter
+uftdi* at uhub? port ?
+ucom*  at uftdi? portno ?
+
+uplcom*        at uhub? port ?         # I/O DATA USB-RSAQ2 serial adapter
+ucom*  at uplcom? portno ?
+
+umct*  at uhub? port ?         # MCT USB-RS232 serial adapter
+ucom*  at umct? portno ?
+
+# USB Generic driver
+ugen*  at uhub? port ?
+
+#
+# accept filters
+pseudo-device   accf_data              # "dataready" accept filter
+pseudo-device   accf_http              # "httpready" accept filter
+
+pseudo-device  loop            1       # network loopback
+pseudo-device  ppp                     # serial-line IP ports
+pseudo-device  pppoe                   # PPP over Ethernet (RFC 2516)
+pseudo-device  pty                     # pseudo-terminals
+pseudo-device  bpfilter                # packet filter ports
+#pseudo-device carp                    # Common Address Redundancy Protocol
+pseudo-device  ipfilter                # IP filter, NAT
+
+pseudo-device  vnd                     # virtual disk ick
+#options       VND_COMPRESSION         # compressed vnd(4)
+#pseudo-device ccd             4       # concatenated disks
+pseudo-device  fss                     # file system snapshot device
+#pseudo-device cgd             4       # cryptographic disks
+pseudo-device  rnd                     # /dev/random and in-kernel generator
+pseudo-device  clockctl                # user control of clock subsystem
+
+pseudo-device  wsmux                   # mouse & keyboard multiplexor
+#pseudo-device md                      # memory disk device (ramdisk)
+
+#pseudo-device raid            8       # RAIDframe disk driver
+#options       RAID_AUTOCONFIG         # auto-configuration of RAID components
+# Options to enable various other RAIDframe RAID types.



Home | Main Index | Thread Index | Old Index