1# 2# GENERIC -- Generic kernel configuration file for FreeBSD/RISC-V 3# 4# For more information on this file, please read the config(5) manual page, 5# and/or the handbook section on Kernel Configuration Files: 6# 7# https://docs.freebsd.org/en/books/handbook/kernelconfig/#kernelconfig-config 8# 9# The handbook is also available locally in /usr/share/doc/handbook 10# if you've installed the doc distribution, otherwise always see the 11# FreeBSD World Wide Web server (https://www.FreeBSD.org/) for the 12# latest information. 13# 14# An exhaustive list of options and more detailed explanations of the 15# device lines is also present in the ../../conf/NOTES and NOTES files. 16# If you are in doubt as to the purpose or necessity of a line, check first 17# in NOTES. 18# 19# $FreeBSD$ 20 21cpu RISCV 22ident GENERIC 23 24makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols 25makeoptions WITH_CTF=1 # Run ctfconvert(1) for DTrace support 26 27options SCHED_ULE # ULE scheduler 28options PREEMPTION # Enable kernel thread preemption 29options VIMAGE # Subsystem virtualization, e.g. VNET 30options INET # InterNETworking 31options INET6 # IPv6 communications protocols 32options TCP_HHOOK # hhook(9) framework for TCP 33options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 34options ROUTE_MPATH # Multipath routing support 35options TCP_OFFLOAD # TCP offload 36options SCTP_SUPPORT # Allow kldload of SCTP 37options FFS # Berkeley Fast Filesystem 38options SOFTUPDATES # Enable FFS soft updates support 39options UFS_ACL # Support for access control lists 40options UFS_DIRHASH # Improve performance on big directories 41options UFS_GJOURNAL # Enable gjournal-based UFS journaling 42options QUOTA # Enable disk quotas for UFS 43options NFSCL # Network Filesystem Client 44options NFSD # Network Filesystem Server 45options NFSLOCKD # Network Lock Manager 46options NFS_ROOT # NFS usable as /, requires NFSCL 47options MSDOSFS # MSDOS Filesystem 48options CD9660 # ISO 9660 Filesystem 49options PROCFS # Process filesystem (requires PSEUDOFS) 50options PSEUDOFS # Pseudo-filesystem framework 51options TMPFS # Efficient memory filesystem 52options GEOM_PART_GPT # GUID Partition Tables. 53options GEOM_RAID # Soft RAID functionality. 54options GEOM_LABEL # Provides labelization 55options COMPAT_FREEBSD12 # Compatible with FreeBSD12 56options COMPAT_FREEBSD13 # Compatible with FreeBSD13 57options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI 58options KTRACE # ktrace(1) support 59options STACK # stack(9) support 60options SYSVSHM # SYSV-style shared memory 61options SYSVMSG # SYSV-style message queues 62options SYSVSEM # SYSV-style semaphores 63options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions 64options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. 65options KBD_INSTALL_CDEV # install a CDEV entry in /dev 66# options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) 67options AUDIT # Security event auditing 68options CAPABILITY_MODE # Capsicum capability mode 69options CAPABILITIES # Capsicum capabilities 70options MAC # TrustedBSD MAC Framework 71options KDTRACE_FRAME # Ensure frames are compiled in 72options KDTRACE_HOOKS # Kernel DTrace hooks 73options DDB_CTF # Kernel ELF linker loads CTF data 74options FPE # Floating-point extension support 75options RACCT # Resource accounting framework 76options RACCT_DEFAULT_TO_DISABLED # Set kern.racct.enable=0 by default 77options RCTL # Resource limits 78options SMP 79options INTRNG 80 81# RISC-V SBI console 82device rcons 83 84# EXT_RESOURCES pseudo devices 85options EXT_RESOURCES 86device clk 87device hwreset 88device syscon 89device syscon_power 90device riscv_syscon 91 92# Bus drivers 93device pci 94 95# Block devices 96device scbus 97device da 98 99# VirtIO support 100device virtio # Generic VirtIO bus (required) 101device virtio_pci # VirtIO PCI device 102device vtnet # VirtIO Ethernet device 103device virtio_blk # VirtIO Block device 104device virtio_mmio # VirtIO MMIO bus 105 106# NVM Express (NVMe) support 107device nvme # base NVMe driver 108options NVME_USE_NVD=0 # prefer the cam(4) based nda(4) driver 109device nvd # expose NVMe namespaces as disks, depends on nvme 110 111# USB support 112options USB_DEBUG # enable debug msgs 113device ohci # OHCI USB interface 114device uhci # UHCI USB interface 115device ehci # EHCI USB interface (USB 2.0) 116device xhci # XHCI USB interface (USB 3.0) 117device usb # USB Bus (required) 118device ukbd # Keyboard 119device umass # Disks/Mass storage - Requires scbus and da 120 121# HID support 122options HID_DEBUG # enable debug msgs 123device hid # Generic HID support 124 125# DTrace support 126# device dtrace 127# device dtrace_profile 128# device dtrace_sdt 129# device dtrace_fbt 130# device dtrace_systrace 131# device dtrace_prototype 132# device dtraceall 133 134# Serial (COM) ports 135device uart # Generic UART driver 136device uart_lowrisc # lowRISC UART driver 137device uart_ns8250 # ns8250-type UART driver 138 139# Console 140device vt 141device kbdmux 142 143# RTC 144device goldfish_rtc # QEMU RTC 145 146# Ethernet drivers 147device cgem # Cadence GEM Gigabit Ethernet device 148device miibus # MII bus support 149device xae # Xilinx AXI Ethernet MAC 150 151# DMA support 152device xdma # DMA interface 153device axidma # Xilinx AXI DMA Controller 154 155# GPIO 156device gpio 157 158# SPI 159device spibus 160device spigen 161 162# Uncomment for memory disk 163# options MD_ROOT 164# options MD_ROOT_SIZE=32768 # 32MB ram disk 165# makeoptions MFS_IMAGE=/path/to/img 166# options ROOTDEVNAME=\"ufs:/dev/md0\" 167 168# Uncomment for virtio block device 169# options ROOTDEVNAME=\"ufs:/dev/vtbd0\" 170 171# Debugging support. Always need this: 172options KDB # Enable kernel debugger support. 173options KDB_TRACE # Print a stack trace for a panic. 174# For full debugger support use (turn off in stable branch): 175options DDB # Support DDB. 176# options GDB # Support remote GDB. 177options DEADLKRES # Enable the deadlock resolver 178options INVARIANTS # Enable calls of extra sanity checking 179options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS 180options WITNESS # Enable checks to detect deadlocks and cycles 181options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed 182options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones 183# options EARLY_PRINTF 184options VERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default 185 186# Kernel dump features. 187options ZSTDIO # zstd-compressed kernel and user dumps 188 189# Pseudo devices. 190device crypto # core crypto support 191device loop # Network loopback 192device ether # Ethernet support 193device vlan # 802.1Q VLAN support 194device tuntap # Packet tunnel. 195device md # Memory "disks" 196device gif # IPv6 and IPv4 tunneling 197device firmware # firmware assist module 198 199# The `bpf' device enables the Berkeley Packet Filter. 200# Be aware of the administrative consequences of enabling this! 201# Note that 'bpf' is required for DHCP. 202device bpf # Berkeley packet filter 203 204# Flattened Device Tree 205options FDT 206makeoptions MODULES_EXTRA+="dtb/sifive" 207 208# I2C support 209device iicbus # Bus support, required for iicoc below. 210device iicoc # OpenCores I2C controller support 211 212# SiFive device drivers 213device fu740_pci_dw 214device sifive_gpio 215device sifive_spi 216include "../sifive/std.sifive" 217