LOONGSON revision 1.9
11.9Snonaka# $NetBSD: LOONGSON,v 1.9 2012/03/02 13:20:57 nonaka Exp $
21.1Sbouyer#
31.1Sbouyer# LOONGSON machine description file
41.1Sbouyer# 
51.1Sbouyer# This machine description file is used to generate the default NetBSD
61.1Sbouyer# kernel.  The generic kernel does not include all options, subsystems
71.1Sbouyer# and device drivers, but should be useful for most applications.
81.1Sbouyer#
91.1Sbouyer# The machine description file can be customised for your specific
101.1Sbouyer# machine to reduce the kernel size and improve its performance.
111.1Sbouyer#
121.1Sbouyer# For further information on compiling NetBSD kernels, see the config(8)
131.1Sbouyer# man page.
141.1Sbouyer#
151.1Sbouyer# For further information on hardware support for this architecture, see
161.1Sbouyer# the intro(4) man page.  For further information about kernel options
171.1Sbouyer# for this architecture, see the options(4) man page.  For an explanation
181.1Sbouyer# of each device driver in this file see the section 4 man page for the
191.1Sbouyer# device.
201.1Sbouyer
211.1Sbouyerinclude		"arch/evbmips/conf/std.loongson"
221.1Sbouyer
231.1Sbouyeroptions 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
241.1Sbouyer
251.9Snonaka#ident 		"LOONGSON-$Revision: 1.9 $"
261.1Sbouyer
271.1Sbouyermaxusers	16
281.1Sbouyer
291.1Sbouyer# Standard system options
301.1Sbouyeroptions 	DDB			# in-kernel debugger
311.1Sbouyer#options 	DDB_ONPANIC=0		# don't enter debugger on panic
321.1Sbouyeroptions 	DDB_HISTORY_SIZE=512	# enable history editing in DDB
331.1Sbouyer#options 	KGDB			# remote debugger
341.1Sbouyeroptions 	DIAGNOSTIC		# extra kernel debugging checks
351.1Sbouyer#options 	DEBUG			# extra kernel debugging support
361.1Sbouyer#options 	PMAP_FAULTINFO
371.1Sbouyer#options 	LOCKDEBUG
381.1Sbouyermakeoptions	DEBUG="-g"
391.1Sbouyeroptions 	KTRACE			# system call tracing support
401.1Sbouyeroptions 	MSGBUFSIZE=8192		# dmesg buffer size
411.1Sbouyer
421.1Sbouyer## UVM options.
431.1Sbouyer#options 	UVM_PAGE_TRKOWN
441.1Sbouyer#options 	UVMHIST
451.1Sbouyer#options 	UVMHIST_PRINT	# Loud!
461.1Sbouyer
471.1Sbouyer#options 	SCSIVERBOSE		# human readable SCSI error messages
481.1Sbouyer#options 	PCMCIAVERBOSE		# verbose PCMCIA configuration messages
491.1Sbouyer#options 	PCMCIADEBUG
501.1Sbouyer#options 	PCMCIACISDEBUG
511.1Sbouyer
521.1Sbouyer#options 	RTC_OFFSET=0	# hardware clock is this many mins. west of GMT
531.1Sbouyer#options 	RTC_OFFSET=-540		# JST-9
541.1Sbouyer#options 	RTC_OFFSET=480		# PST8
551.1Sbouyer					# In NO RTC_OFFSET , inherit RTC_OFFSET
561.1Sbouyer					# from Windows CE.
571.1Sbouyeroptions 	NTP			# network time protocol
581.1Sbouyer
591.1Sbouyer#options 	WINCE_DEFAULT_SETTING	# Debugging use
601.1Sbouyer
611.1Sbouyer#options 	SYSCALL_DEBUG		# for debug
621.1Sbouyer#options 	HPCMIPS_L1CACHE_DISABLE	# disable L1 cache for debug
631.1Sbouyeroptions 	USERCONF		# userconf(4) support
641.1Sbouyer#options	PIPE_SOCKETPAIR		# smaller, but slower pipe(2)
651.1Sbouyeroptions 	SYSCTL_INCLUDE_DESCR	# Include sysctl descriptions in kernel
661.1Sbouyer
671.1Sbouyer# Filesystem options
681.1Sbouyerfile-system 	FFS		# fast filesystem with user and group quotas
691.1Sbouyerfile-system 	MFS		# memory-based filesystem
701.1Sbouyerfile-system 	NFS		# Sun NFS-compatible filesystem (client)
711.1Sbouyerfile-system	EXT2FS		# second extended file system (linux)
721.1Sbouyer#file-system	LFS		# Log-based filesystem (still experimental)
731.1Sbouyerfile-system 	CD9660		# ISO 9660 + Rock Ridge file system
741.1Sbouyerfile-system 	MSDOSFS		# MS-DOS file system
751.1Sbouyer#file-system 	FDESC		# /dev/fd
761.1Sbouyerfile-system 	KERNFS		# /kern (kernel informational filesystem)
771.9Snonakafile-system 	NULLFS		# loopback file system
781.1Sbouyer#file-system 	OVERLAY		# overlay file system
791.1Sbouyerfile-system 	PROCFS		# /proc
801.1Sbouyer#file-system 	UMAPFS		# NULLFS + uid and gid remapping
811.1Sbouyerfile-system 	UNION
821.1Sbouyerfile-system	PTYFS		# /dev/pts/N support
831.9Snonakafile-system	TMPFS		# Efficient memory file-system
841.1Sbouyer#file-system	UDF		# experimental - OSTA UDF CD/DVD file-system
851.1Sbouyer
861.1Sbouyeroptions 	NFSSERVER	# Sun NFS-compatible filesystem (server)
871.8Sdhollandoptions 	WAPBL		# File system journaling support
881.1Sbouyer#options	UFS_DIRHASH	# UFS Large Directory Hashing - Experimental
891.1Sbouyer#options 	QUOTA		# legacy UFS quotas
901.1Sbouyer#options 	QUOTA2		# new, in-filesystem UFS quotas
911.1Sbouyer#options 	FFS_NO_SNAPSHOT	# No FFS snapshot support
921.1Sbouyer
931.1Sbouyer# Networking options
941.1Sbouyer#options 	GATEWAY		# IP packet forwarding
951.1Sbouyeroptions 	INET		# IP + ICMP + TCP + UDP
961.1Sbouyeroptions 	INET6		# IPV6
971.1Sbouyer#options 	IPSEC		# IP security
981.1Sbouyer#options 	IPSEC_ESP	# IP security (encryption part; define w/ IPSEC)
991.1Sbouyer#options 	IPSEC_NAT_T	# IPsec NAT traversal (NAT-T)
1001.1Sbouyer#options 	IPSEC_DEBUG	# debug for IP security
1011.1Sbouyer#options 	MROUTING	# Multicast routing support
1021.1Sbouyer#options 	PIM		# Protocol Independent Multicast
1031.1Sbouyer#options 	ISO		# OSI networking
1041.1Sbouyer#options 	TPIP		# TPIP
1051.1Sbouyer#options 	EON		# OSI tunneling over IP
1061.1Sbouyeroptions 	PFIL_HOOKS	# pfil(9) packet filter hooks
1071.1Sbouyeroptions 	IPFILTER_LOG	# ipmon(8) log support
1081.1Sbouyeroptions 	IPFILTER_LOOKUP	# ippool(8) support
1091.1Sbouyeroptions 	IPFILTER_COMPAT # Compat for IP-Filter
1101.1Sbouyer#options 	IPFILTER_DEFAULT_BLOCK	# block all packets by default
1111.1Sbouyer
1121.1Sbouyer#options 	ALTQ		# Manipulate network interfaces' output queues
1131.1Sbouyer#options 	ALTQ_BLUE	# Stochastic Fair Blue
1141.1Sbouyer#options 	ALTQ_CBQ	# Class-Based Queueing
1151.1Sbouyer#options 	ALTQ_CDNR	# Diffserv Traffic Conditioner
1161.1Sbouyer#options 	ALTQ_FIFOQ	# First-In First-Out Queue
1171.1Sbouyer#options 	ALTQ_FLOWVALVE	# RED/flow-valve (red-penalty-box)
1181.1Sbouyer#options 	ALTQ_HFSC	# Hierarchical Fair Service Curve
1191.1Sbouyer#options 	ALTQ_LOCALQ	# Local queueing discipline
1201.1Sbouyer#options 	ALTQ_PRIQ	# Priority Queueing
1211.1Sbouyer#options 	ALTQ_RED	# Random Early Detection
1221.1Sbouyer#options 	ALTQ_RIO	# RED with IN/OUT
1231.1Sbouyer#options 	ALTQ_WFQ	# Weighted Fair Queueing
1241.1Sbouyer
1251.1Sbouyer# NetBSD backwards compatibility
1261.1Sbouyeroptions 	COMPAT_43
1271.1Sbouyeroptions 	COMPAT_16
1281.1Sbouyeroptions 	COMPAT_20
1291.1Sbouyeroptions 	COMPAT_30	# NetBSD 3.0 compatibility.
1301.1Sbouyeroptions 	COMPAT_40	# NetBSD 4.0 compatibility.
1311.1Sbouyeroptions 	COMPAT_50	# NetBSD 5.0 compatibility.
1321.1Sbouyeroptions		COMPAT_BSDPTY	# /dev/[pt]ty?? ptys.
1331.1Sbouyer
1341.1Sbouyer
1351.1Sbouyer#options 	NFS_BOOT_DHCP
1361.1Sbouyeroptions 	NFS_BOOT_BOOTP
1371.1Sbouyer#options 	NFS_BOOT_BOOTPARAM
1381.1Sbouyer
1391.1Sbouyer# compile options
1401.1Sbouyer#makeoptions	DEFGP="-G 10"
1411.1Sbouyer
1421.1Sbouyerconfig		netbsd		root on ? type ?
1431.1Sbouyer
1441.1Sbouyer# WS console uses SUN or VT100 terminal emulation
1451.1Sbouyeroptions 	WSEMUL_VT100
1461.4Smacallanoptions		WS_KERNEL_FG=WSCOL_GREEN
1471.1Sbouyer#options 	WSDISPLAY_DEFAULTSCREENS=4
1481.1Sbouyeroptions 	FONT_GALLANT12x22
1491.1Sbouyer# compatibility to other console drivers
1501.1Sbouyeroptions 	WSDISPLAY_COMPAT_RAWKBD		# can get raw scancodes
1511.1Sbouyer#
1521.1Sbouyer# Hpckbd will set key board layout appropriately. You can use option
1531.1Sbouyer# 'PCKBD_LAYOUT' to overrite the default layout.
1541.1Sbouyer#
1551.1Sbouyer#options 	PCKBD_LAYOUT="(KB_US | KB_SWAPCTRLCAPS | KB_MACHDEP)"
1561.1Sbouyer
1571.1Sbouyermainbus0	at root
1581.1Sbouyercpu0		at mainbus0
1591.1Sbouyerbonito0		at mainbus0
1601.1Sbouyerpci0		at bonito0
1611.1Sbouyersisfb0		at pci0 dev ? function ?
1621.5Smacallanvoyager0	at pci0 dev ? function ?	# SM502 on GDIUM
1631.5Smacallanvoyagerfb0	at voyager0			# framebuffer portion
1641.3Smacallaniic*		at voyager0
1651.9Snonakastrtc*		at iic? addr 0x68		# GDIUM's real time clock
1661.9Snonakaoptions 	STRTC_NO_USERRAM
1671.9Snonakalmtemp*		at iic? addr 0x48		# GDIUM's temperature sensor
1681.9Snonakastvii*		at iic? addr 0x40		# GDIUM's onboard microcontroller
1691.9Snonakalynxfb0		at pci0 dev ? function ?	# SM712 on Yeeloong Notebook
1701.1Sbouyer#genfb0		at pci0 dev ? function ?
1711.1Sbouyerwsdisplay*	at wsemuldisplaydev?
1721.1Sbouyerehci*		at pci0 dev ? function ?
1731.1Sbouyer#options 	EHCI_DEBUG
1741.1Sbouyerohci*		at pci0 dev ? function ?
1751.1Sbouyer#options 	OHCI_DEBUG, USB_DEBUG, UHUB_DEBUG
1761.1Sbouyer
1771.9Snonakagcscpcib*	at pci? dev ? function ?	# AMD CS5535/CS5536 PCI-ISA w/
1781.9Snonakagpio*		at gcscpcib?			# timecounter, watchdog and GPIO
1791.9Snonakaisa0		at gcscpcib?
1801.9Snonaka
1811.9Snonakapcib*		at pci?
1821.9Snonakaisa0		at pcib?
1831.9Snonaka
1841.9Snonakapckbc0		at isa?				# PC keyboard controller
1851.9Snonakapckbd*		at pckbc?			# PC keyboard
1861.9Snonakapms*		at pckbc?			# PS/2 mouse for wsmouse
1871.9Snonakaoptions 	PMS_SYNAPTICS_TOUCHPAD	# Enable support for Synaptics Touchpads
1881.9Snonakaoptions 	PMS_ELANTECH_TOUCHPAD	# Enable support for Elantech Touchpads
1891.9Snonakawskbd*		at pckbd? console ?
1901.9Snonakawsmouse*	at pms? mux 0
1911.1Sbouyer
1921.1Sbouyermcclock*	at isa? port 0x70		# mc146818-compatible
1931.1Sbouyercom0		at isa? port 0x2f8 irq 3	# Fuloong 2F only
1941.1Sbouyercom1		at isa? port 0x3f8 irq 4	# Fuloong 2F only (IR port)
1951.1Sbouyer
1961.9Snonakagcscaudio*	at pci?
1971.9Snonakaaudio*		at audiobus?
1981.9Snonaka
1991.1Sbouyerpciide* 	at pci? dev ? function ? flags 0x0000	# GENERIC pciide driver
2001.1Sbouyerviaide* 	at pci? dev ? function ?	# VIA/AMD/Nvidia IDE controllers
2011.2Sbouyeroptions  	WDC_NO_IDS #workaround CS5536+JMH330 interrupt disable bug
2021.1Sbouyer
2031.1Sbouyer# ATA (IDE) bus support
2041.1Sbouyeratabus* at ata?
2051.1Sbouyeroptions 	ATADEBUG
2061.1Sbouyer
2071.1Sbouyer# IDE drives
2081.1Sbouyer# Flags are used only with controllers that support DMA operations
2091.1Sbouyer# and mode settings (e.g. some pciide controllers)
2101.1Sbouyer# The lowest order four bits (rightmost digit) of the flags define the PIO
2111.1Sbouyer# mode to use, the next set of four bits the DMA mode and the third set the
2121.1Sbouyer# UltraDMA mode. For each set of four bits, the 3 lower bits define the mode
2131.1Sbouyer# to use, and the last bit must be 1 for this setting to be used.
2141.1Sbouyer# For DMA and UDMA, 0xf (1111) means 'disable'.
2151.1Sbouyer# 0x0fac means 'use PIO mode 4, DMA mode 2, disable UltraDMA'.
2161.1Sbouyer# (0xc=1100, 0xa=1010, 0xf=1111)
2171.1Sbouyer# 0x0000 means "use whatever the drive claims to support".
2181.1Sbouyerwd*	at atabus? drive ? flags 0x0000
2191.1Sbouyer
2201.1Sbouyer# ATAPI bus support
2211.1Sbouyer#atapibus* at atapi?
2221.1Sbouyer
2231.1Sbouyer# ATAPI devices
2241.1Sbouyer# flags have the same meaning as for IDE drives.
2251.1Sbouyer#cd*	at atapibus? drive ? flags 0x0000	# ATAPI CD-ROM drives
2261.1Sbouyer#sd*	at atapibus? drive ? flags 0x0000	# ATAPI disk drives
2271.1Sbouyer#st*	at atapibus? drive ? flags 0x0000	# ATAPI tape drives
2281.1Sbouyer#uk*	at atapibus? drive ? flags 0x0000	# ATAPI unknown
2291.1Sbouyer
2301.1Sbouyerral*	at pci? dev ? function ?	# RL2561S 802.11b/g
2311.1Sbouyerrtk*	at pci? dev ? function ?	# RTL8139 100/10 Ethernet
2321.1Sbouyerre*	at pci? dev ? function ?	# Realtek 8139C+/8169/8169S/8110S
2331.1Sbouyer# MII/PHY support
2341.1Sbouyerrgephy*	at mii? phy ?			# Realtek 8169S/8110S internal PHYs
2351.1Sbouyerrlphy*	at mii? phy ?			# Realtek 8139/8201L PHYs
2361.1Sbouyerukphy*	at mii? phy ?			# generic unknown PHYs
2371.1Sbouyer
2381.1Sbouyer# USB Hubs
2391.1Sbouyerusb*	at ehci?
2401.1Sbouyerusb*	at ohci?
2411.1Sbouyeruhub*	at usb?
2421.1Sbouyeruhub*	at uhub? port ?
2431.1Sbouyer
2441.1Sbouyer# USB HID device
2451.1Sbouyeruhidev*	at uhub? port ? configuration ? interface ?
2461.1Sbouyer
2471.1Sbouyer# USB Mice
2481.1Sbouyerums*		at uhidev? reportid ?
2491.1Sbouyerwsmouse*	at ums? mux 0
2501.1Sbouyer
2511.1Sbouyer# USB Keyboards
2521.1Sbouyerukbd*	at uhidev? reportid ?
2531.1Sbouyerwskbd*	at ukbd? console ? mux 1
2541.6Smacallanoptions	GDIUM_KEYBOARD_HACK	# support Fn key on Gdium
2551.1Sbouyer
2561.1Sbouyer# USB Generic HID devices
2571.1Sbouyeruhid*	at uhidev? reportid ?
2581.1Sbouyer
2591.1Sbouyer# USB serial adapter
2601.1Sbouyeruftdi*	at uhub? port ? configuration ?
2611.1Sbouyer
2621.1Sbouyer# USB Printer
2631.1Sbouyerulpt*	at uhub? port ? configuration ? interface ?
2641.1Sbouyer
2651.1Sbouyer# USB Modem
2661.1Sbouyerumodem*	at uhub? port ? configuration ?
2671.1Sbouyerucom*	at umodem?
2681.1Sbouyer
2691.1Sbouyer# Option N.V. Wireless WAN modems
2701.1Sbouyeruhso*	at uhub? port ? configuration ?
2711.1Sbouyer
2721.1Sbouyer# USB Mass Storage
2731.1Sbouyerumass*	at uhub? port ? configuration ? interface ?
2741.1Sbouyerscsibus*	at umass? channel ?
2751.1Sbouyersd*		at scsibus? target ? lun ?	# SCSI disk drives
2761.1Sbouyercd*		at scsibus? target ? lun ?	# SCSI CD-ROM drives
2771.1Sbouyer
2781.1Sbouyer# FTDI FT8U100AX serial adapter
2791.1Sbouyeruftdi*	at uhub? port ?
2801.1Sbouyerucom*	at uftdi? portno ?
2811.1Sbouyer
2821.1Sbouyeruplcom*	at uhub? port ?		# I/O DATA USB-RSAQ2 serial adapter
2831.1Sbouyerucom*	at uplcom? portno ?
2841.1Sbouyer
2851.1Sbouyerumct*	at uhub? port ?		# MCT USB-RS232 serial adapter
2861.1Sbouyerucom*	at umct? portno ?
2871.1Sbouyer
2881.1Sbouyer# USB Generic driver
2891.1Sbouyerugen*	at uhub? port ?
2901.1Sbouyer
2911.1Sbouyer#
2921.1Sbouyer# accept filters
2931.1Sbouyerpseudo-device   accf_data		# "dataready" accept filter
2941.1Sbouyerpseudo-device   accf_http		# "httpready" accept filter
2951.1Sbouyer
2961.1Sbouyerpseudo-device	loop		1	# network loopback
2971.1Sbouyerpseudo-device	ppp			# serial-line IP ports
2981.1Sbouyerpseudo-device	pppoe			# PPP over Ethernet (RFC 2516)
2991.1Sbouyerpseudo-device	pty			# pseudo-terminals
3001.1Sbouyerpseudo-device	bpfilter		# packet filter ports
3011.1Sbouyer#pseudo-device	carp			# Common Address Redundancy Protocol
3021.1Sbouyerpseudo-device	ipfilter		# IP filter, NAT
3031.1Sbouyer
3041.1Sbouyerpseudo-device	vnd			# virtual disk ick
3051.1Sbouyer#options 	VND_COMPRESSION		# compressed vnd(4)
3061.1Sbouyer#pseudo-device	ccd		4	# concatenated disks
3071.1Sbouyerpseudo-device	fss			# file system snapshot device
3081.1Sbouyer#pseudo-device	cgd		4	# cryptographic disks
3091.1Sbouyerpseudo-device	clockctl		# user control of clock subsystem
3101.1Sbouyer
3111.1Sbouyerpseudo-device	wsmux			# mouse & keyboard multiplexor
3121.9Snonakapseudo-device	wsfont
3131.1Sbouyer#pseudo-device	md			# memory disk device (ramdisk)
3141.1Sbouyer
3151.1Sbouyer#pseudo-device	raid		8	# RAIDframe disk driver
3161.1Sbouyer#options 	RAID_AUTOCONFIG		# auto-configuration of RAID components
3171.1Sbouyer# Options to enable various other RAIDframe RAID types.
3181.1Sbouyer# options	RF_INCLUDE_EVENODD=1
3191.1Sbouyer# options	RF_INCLUDE_RAID5_RS=1
3201.1Sbouyer# options	RF_INCLUDE_PARITYLOGGING=1
3211.1Sbouyer# options	RF_INCLUDE_CHAINDECLUSTER=1
3221.1Sbouyer# options	RF_INCLUDE_INTERDECLUSTER=1
3231.1Sbouyer# options 	RF_INCLUDE_PARITY_DECLUSTERING=1
3241.1Sbouyer# options	RF_INCLUDE_PARITY_DECLUSTERING_DS=1
3251.1Sbouyer
3261.1Sbouyer# for IPv6
3271.1Sbouyerpseudo-device	gif			# IPv[46] over IPv[46] tunnel (RFC1933)
3281.1Sbouyer#pseudo-device	faith			# IPv[46] tcp relay translation i/f
3291.1Sbouyerpseudo-device	stf			# 6to4 IPv6 over IPv4 encapsulation
3301.1Sbouyer
3311.1Sbouyer## IEEE 802.1Q Virtual LAN encapsulation, see vlan(4).
3321.1Sbouyerpseudo-device	vlan
3331.1Sbouyer
3341.1Sbouyer## Simple inter-network traffic bridging
3351.1Sbouyerpseudo-device	bridge
3361.1Sbouyer#options	BRIDGE_IPF		# bridge uses IP/IPv6 pfil hooks too
3371.1Sbouyerpseudo-device	agr			# IEEE 802.3ad link aggregation
3381.1Sbouyerpseudo-device	ksyms			# /dev/ksyms
3391.1Sbouyer#pseudo-device	pf			# PF packet filter
3401.1Sbouyer#pseudo-device	pflog			# PF log if
3411.1Sbouyer
3421.1Sbouyer# Veriexec
3431.1Sbouyer#
3441.1Sbouyer# a pseudo device needed for veriexec
3451.1Sbouyer#pseudo-device	veriexec		1
3461.1Sbouyer#
3471.1Sbouyer# Uncomment the fingerprint methods below that are desired. Note that
3481.1Sbouyer# removing fingerprint methods will have almost no impact on the kernel
3491.1Sbouyer# code size.
3501.1Sbouyer#
3511.1Sbouyer#options VERIFIED_EXEC_FP_RMD160
3521.1Sbouyer#options VERIFIED_EXEC_FP_SHA256
3531.1Sbouyer#options VERIFIED_EXEC_FP_SHA384
3541.1Sbouyer#options VERIFIED_EXEC_FP_SHA512
3551.1Sbouyer#options VERIFIED_EXEC_FP_SHA1
3561.1Sbouyer#options VERIFIED_EXEC_FP_MD5
357