1# $NetBSD: LOONGSON,v 1.46 2022/08/07 02:52:25 simonb Exp $
2#
3# LOONGSON machine description file
4#
5# This machine description file is used to generate the default NetBSD
6# kernel.  The generic kernel does not include all options, subsystems
7# and device drivers, but should be useful for most applications.
8#
9# The machine description file can be customised for your specific
10# machine to reduce the kernel size and improve its performance.
11#
12# For further information on compiling NetBSD kernels, see the config(8)
13# man page.
14#
15# For further information on hardware support for this architecture, see
16# the intro(4) man page.  For further information about kernel options
17# for this architecture, see the options(4) man page.  For an explanation
18# of each device driver in this file see the section 4 man page for the
19# device.
20
21include   "arch/evbmips/conf/std.loongson"
22
23options   INCLUDE_CONFIG_FILE # embed config file in kernel binary
24
25#ident              "LOONGSON-$Revision: 1.46 $"
26
27maxusers  16
28
29# Standard system options
30options   DDB                           # in-kernel debugger
31#options  DDB_ONPANIC=0                 # don't enter debugger on panic
32options   DDB_HISTORY_SIZE=512          # enable history editing in DDB
33#options  KGDB                          # remote debugger
34options   DIAGNOSTIC                    # extra kernel debugging checks
35#options  DEBUG                         # extra kernel debugging support
36#options  PMAP_FAULTINFO
37#options  LOCKDEBUG
38makeoptions         DEBUG="-g"
39makeoptions         COPY_SYMTAB=1                 # size for embedded symbol table
40options   KTRACE                        # system call tracing support
41options   MSGBUFSIZE=8192               # dmesg buffer size
42
43## UVM options.
44#options  UVM_PAGE_TRKOWN
45#options  UVMHIST
46#options  UVMHIST_PRINT       # Loud!
47
48#options  SCSIVERBOSE                   # human readable SCSI error messages
49#options  PCMCIAVERBOSE                 # verbose PCMCIA configuration messages
50#options  PCMCIADEBUG
51#options  PCMCIACISDEBUG
52
53#options  RTC_OFFSET=0        # hardware clock is this many mins. west of GMT
54#options  RTC_OFFSET=-540               # JST-9
55#options  RTC_OFFSET=480                # PST8
56                                                  # In NO RTC_OFFSET , inherit RTC_OFFSET
57                                                  # from Windows CE.
58options   NTP                           # network time protocol
59
60#options  WINCE_DEFAULT_SETTING         # Debugging use
61
62# Note: SysV IPC parameters can be changed dynamically; see sysctl(8).
63options   SYSVMSG             # System V-like message queues
64options   SYSVSEM             # System V-like semaphores
65options   SYSVSHM             # System V-like memory sharing
66
67#options  SYSCALL_DEBUG                 # for debug
68#options  HPCMIPS_L1CACHE_DISABLE       # disable L1 cache for debug
69options   USERCONF            # userconf(4) support
70#options  PIPE_SOCKETPAIR               # smaller, but slower pipe(2)
71options   SYSCTL_INCLUDE_DESCR          # Include sysctl descriptions in kernel
72
73options   INSECURE  # disable kernel security levels
74
75# Filesystem options
76file-system         FFS                 # fast filesystem with user and group quotas
77file-system         MFS                 # memory-based filesystem
78file-system         NFS                 # Sun NFS-compatible filesystem (client)
79file-system         EXT2FS              # second extended file system (linux)
80#file-system        LFS                 # Log-based filesystem (still experimental)
81file-system         CD9660              # ISO 9660 + Rock Ridge file system
82file-system         MSDOSFS             # MS-DOS file system
83#file-system        FDESC               # /dev/fd
84file-system         KERNFS              # /kern (kernel informational filesystem)
85file-system         NULLFS              # loopback file system
86#file-system        OVERLAY             # overlay file system
87file-system         PROCFS              # /proc
88#file-system        UMAPFS              # NULLFS + uid and gid remapping
89file-system         UNION
90file-system         PTYFS               # /dev/pts/N support
91file-system         TMPFS               # Efficient memory file-system
92#file-system        UDF                 # experimental - OSTA UDF CD/DVD file-system
93
94#options  FFS_EI              # FFS Endian Independent support
95#options  FFS_NO_SNAPSHOT     # No FFS snapshot support
96#options  QUOTA               # legacy UFS quotas
97#options  QUOTA2              # new, in-filesystem UFS quotas
98#options  UFS_DIRHASH         # UFS Large Directory Hashing
99#options  UFS_EXTATTR         # Extended attribute support for UFS1
100options   WAPBL               # File system journaling support
101#options  DISKLABEL_EI        # disklabel Endian Independent support
102options   NFSSERVER # Network File System server
103
104# Alternate buffer queue strategies for better responsiveness under high
105# disk I/O load.
106#options  BUFQ_READPRIO
107options   BUFQ_PRIOCSCAN
108
109# Networking options
110#options  GATEWAY             # IP packet forwarding
111options   INET                # IP + ICMP + TCP + UDP
112options   INET6               # IPV6
113#options  IPSEC               # IP security
114#options  IPSEC_DEBUG         # debug for IP security
115#options  MROUTING  # Multicast routing support
116#options  PIM                 # Protocol Independent Multicast
117
118#options  ALTQ                # Manipulate network interfaces' output queues
119#options  ALTQ_BLUE # Stochastic Fair Blue
120#options  ALTQ_CBQ  # Class-Based Queueing
121#options  ALTQ_CDNR # Diffserv Traffic Conditioner
122#options  ALTQ_FIFOQ          # First-In First-Out Queue
123#options  ALTQ_FLOWVALVE      # RED/flow-valve (red-penalty-box)
124#options  ALTQ_HFSC # Hierarchical Fair Service Curve
125#options  ALTQ_LOCALQ         # Local queueing discipline
126#options  ALTQ_PRIQ # Priority Queueing
127#options  ALTQ_RED  # Random Early Detection
128#options  ALTQ_RIO  # RED with IN/OUT
129#options  ALTQ_WFQ  # Weighted Fair Queueing
130
131# JIT compiler for bpfilter
132#options  SLJIT
133#options  BPFJIT
134
135# NetBSD backwards compatibility
136include   "conf/compat_netbsd16.config"
137
138#options  NFS_BOOT_DHCP
139options   NFS_BOOT_BOOTP
140#options  NFS_BOOT_BOOTPARAM
141
142# compile options
143#makeoptions        DEFGP="-G 10"
144
145config              netbsd              root on ? type ?
146
147# WS console uses SUN or VT100 terminal emulation
148options   WSEMUL_VT100
149options             WSDISPLAY_COMPAT_PCVT
150options   WSDISPLAY_COMPAT_SYSCONS
151options             WSDISPLAY_COMPAT_USL
152options             WSDISPLAY_SCROLLSUPPORT
153options             WS_KERNEL_FG=WSCOL_GREEN
154#options  WSDISPLAY_DEFAULTSCREENS=4
155options   FONT_GALLANT12x22
156options   FONT_BOLD8x16
157# compatibility to other console drivers
158options   WSDISPLAY_COMPAT_RAWKBD                 # can get raw scancodes
159
160mainbus0  at root
161cpu0                at mainbus0
162bonito0             at mainbus0
163pci0                at bonito0
164sisfb0              at pci0 dev ? function ?
165voyager0  at pci0 dev ? function ?      # SM502 on GDIUM
166voyagerfb0          at voyager0                             # framebuffer portion
167pwmclock0 at voyager0                             # clock and CPU freq scaling
168iic*                at voyager0
169strtc*              at iic? addr 0x68             # GDIUM's real time clock (M41T80/81 ?)
170lmtemp*             at iic? addr 0x48             # GDIUM's temperature sensor
171stvii*              at iic? addr 0x40             # GDIUM's onboard microcontroller
172lynxfb0             at pci0 dev ? function ?      # SM712 on Yeeloong Notebook
173#genfb0             at pci0 dev ? function ?
174wsdisplay*          at wsemuldisplaydev?
175
176ehci*               at pci0 dev ? function ?
177#options  EHCI_DEBUG
178ohci*               at pci0 dev ? function ?
179#options  OHCI_DEBUG, USB_DEBUG, UHUB_DEBUG
180
181# USB
182usb*      at ehci?
183usb*      at ohci?
184
185include "dev/usb/usbdevices.config"
186midi*               at midibus?
187
188options             GDIUM_KEYBOARD_HACK # support Fn key on Gdium
189
190gcscpcib* at pci? dev ? function ?      # AMD CS5535/CS5536 PCI-ISA w/
191gpio*               at gcscpcib?                            # timecounter, watchdog and GPIO
192isa0                at gcscpcib?
193
194pcib*               at pci?
195isa0                at pcib?
196
197pckbc0              at isa?                                 # PC keyboard controller
198pckbd*              at pckbc?                     # PC keyboard
199pms*                at pckbc?                     # PS/2 mouse for wsmouse
200#options  PMS_DISABLE_POWERHOOK         # Disable PS/2 reset on resume
201options   PMS_SYNAPTICS_TOUCHPAD        # Enable support for Synaptics Touchpads
202options   PMS_ELANTECH_TOUCHPAD         # Enable support for Elantech Touchpads
203options   PMS_ALPS_TOUCHPAD   # Enable support for Alps Touchpads
204wskbd*              at pckbd? console ?
205wsmouse*  at pms? mux 0
206
207mcclock*  at isa? port 0x70             # mc146818-compatible
208com0                at isa? port 0x2f8 irq 3      # Fuloong 2F only
209com1                at isa? port 0x3f8 irq 4      # Fuloong 2F only (IR port)
210
211gcscaudio*          at pci?
212audio*              at audiobus?
213
214spkr*               at audio?           # PC speaker (synthesized)
215
216pciide*   at pci? dev ? function ? flags 0x0000   # GENERIC pciide driver
217viaide*   at pci? dev ? function ?      # VIA/AMD/Nvidia IDE controllers
218options   WDC_NO_IDS #workaround CS5536+JMH330 interrupt disable bug
219
220# ATA (IDE) bus support
221atabus* at ata?
222#options  ATADEBUG
223
224# IDE drives
225# Flags are used only with controllers that support DMA operations
226# and mode settings (e.g. some pciide controllers)
227# The lowest order four bits (rightmost digit) of the flags define the PIO
228# mode to use, the next set of four bits the DMA mode and the third set the
229# UltraDMA mode. For each set of four bits, the 3 lower bits define the mode
230# to use, and the last bit must be 1 for this setting to be used.
231# For DMA and UDMA, 0xf (1111) means 'disable'.
232# 0x0fac means 'use PIO mode 4, DMA mode 2, disable UltraDMA'.
233# (0xc=1100, 0xa=1010, 0xf=1111)
234# 0x0000 means "use whatever the drive claims to support".
235wd*       at atabus? drive ? flags 0x0000
236
237# ATAPI bus support
238#atapibus* at atapi?
239
240# ATAPI devices
241# flags have the same meaning as for IDE drives.
242#cd*      at atapibus? drive ? flags 0x0000       # ATAPI CD-ROM drives
243#sd*      at atapibus? drive ? flags 0x0000       # ATAPI disk drives
244#st*      at atapibus? drive ? flags 0x0000       # ATAPI tape drives
245#uk*      at atapibus? drive ? flags 0x0000       # ATAPI unknown
246
247ral*      at pci? dev ? function ?      # RL2561S 802.11b/g
248rtk*      at pci? dev ? function ?      # RTL8139 100/10 Ethernet
249re*       at pci? dev ? function ?      # Realtek 8139C+/8169/8169S/8110S
250# MII/PHY support
251rgephy*   at mii? phy ?                           # Realtek 8169S/8110S internal PHYs
252rlphy*    at mii? phy ?                           # Realtek 8139/8201L PHYs
253ukphy*    at mii? phy ?                           # generic unknown PHYs
254
255#
256# accept filters
257pseudo-device   accf_data               # "dataready" accept filter
258pseudo-device   accf_http               # "httpready" accept filter
259
260pseudo-device       loop                          # network loopback
261pseudo-device       ppp                           # serial-line IP ports
262pseudo-device       pppoe                         # PPP over Ethernet (RFC 2516)
263pseudo-device       pty                           # pseudo-terminals
264pseudo-device       bpfilter            # packet filter ports
265pseudo-device       carp                          # Common Address Redundancy Protocol
266pseudo-device       npf                           # NPF packet filter
267
268pseudo-device       vnd                           # virtual disk ick
269#options  VND_COMPRESSION               # compressed vnd(4)
270#pseudo-device      ccd                           # concatenated disks
271pseudo-device       fss                           # file system snapshot device
272#pseudo-device      cgd                           # cryptographic disks
273pseudo-device       clockctl            # user control of clock subsystem
274
275pseudo-device       wsmux                         # mouse & keyboard multiplexor
276pseudo-device       wsfont
277#pseudo-device      md                            # memory disk device (ramdisk)
278
279#pseudo-device      raid                          # RAIDframe disk driver
280#options  RAID_AUTOCONFIG               # auto-configuration of RAID components
281# Options to enable various other RAIDframe RAID types.
282# options RF_INCLUDE_EVENODD=1
283# options RF_INCLUDE_RAID5_RS=1
284# options RF_INCLUDE_PARITYLOGGING=1
285# options RF_INCLUDE_CHAINDECLUSTER=1
286# options RF_INCLUDE_INTERDECLUSTER=1
287# options           RF_INCLUDE_PARITY_DECLUSTERING=1
288# options RF_INCLUDE_PARITY_DECLUSTERING_DS=1
289
290# for IPv6
291pseudo-device       gif                           # IPv[46] over IPv[46] tunnel (RFC1933)
292#pseudo-device      faith                         # IPv[46] tcp relay translation i/f
293pseudo-device       stf                           # 6to4 IPv6 over IPv4 encapsulation
294
295## IEEE 802.1Q Virtual LAN encapsulation, see vlan(4).
296pseudo-device       vlan
297
298## Simple inter-network traffic bridging
299pseudo-device       bridge
300#pseudo-device      vether                        # Virtual Ethernet for bridge
301pseudo-device       agr                           # IEEE 802.3ad link aggregation
302pseudo-device       ksyms                         # /dev/ksyms
303pseudo-device       drvctl                        # driver control
304
305include "dev/veriexec.config"
306