#	$NetBSD: EFIKA,v 1.2 2026/07/12 11:43:23 rkujawa Exp $
#
# EFIKA 5200B - Genesi/bplan single-board computer based on the MPC5200B
#
# Standalone configuration for the EFIKA 5200B.

include 	"arch/ofppc/conf/std.ofppc"

options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary

#ident		"EFIKA-$Revision: 1.2 $"

maxusers	32

options 	EFIKA_OFW_WORKAROUNDS
# FIRMWORKSBUGS, and its real-mode OF-call wrapper, ofwreal.S does not work
# on EFIKA. It hangs the kernel during early ofwr_init/savemmu. It does not
# matter if SmartFirmware is running with real-mode? true or false, the 
# result is the same.
#
# It is worth nothing that rjs' original EFIKA port from 2008-2012 used
# FIRMWORKSBUGS option and the kernel booted fine. The problem is that the 
# current ofwreal.S wrapper is not compatible with SmartFirmware. The 
# incompatibility must have been introduced in one of the later refactors.
#
# So we have this EFIKA_OFW_WORKAROUND kludge. OF calls use the standard
# openfirmware_trampoline and the kernel boots. It's just that we need to
# restore proper contents of SDR1 and BATs, which is exactly what the option
# do.

# Standard system options
options 	INSECURE	# disable kernel security checks
#options 	NTP		# NTP phase/frequency locked loop
options 	KTRACE		# system call tracing via ktrace(1)

options 	SYSVMSG		# System V message queues
options 	SYSVSEM		# System V semaphores
options 	SYSVSHM		# System V shared memory

options 	USERCONF	# userconf(4) support
#options 	PIPE_SOCKETPAIR	# smaller, but slower pipe(2)
options 	SYSCTL_INCLUDE_DESCR	# Include sysctl descriptions in kernel
options 	RDB_PART	# Rigid Disk Block partition support

# Alternate buffer queue strategies for better responsiveness under high
# disk I/O load.
#options 	BUFQ_READPRIO
options 	BUFQ_PRIOCSCAN

# Diagnostic/debugging support options
#options 	DIAGNOSTIC	# cheap kernel consistency checks
#options 	DEBUG		# expensive debugging checks/support
options 	DDB		# in-kernel debugger
options 	DDB_HISTORY_SIZE=512	# enable history editing in DDB
options 	DDB_VERBOSE_HELP
options 	TRAP_PANICWAIT
options 	MSGBUFSIZE=32768

makeoptions	DEBUG="-g"	# compile full symbol table

# Wedge support.  The disk on the onboard IDE port is RDB-partitioned and
# removable media may arrive with an MBR, so enable those methods in addition to
# the GPT and Apple methods.
options 	DKWEDGE_AUTODISCOVER	# Automatically add dk(4) instances
options 	DKWEDGE_METHOD_MBR	# Support MBR partitions as wedges
options 	DKWEDGE_METHOD_RDB	# Support Amiga RDB partitions as wedges

# File systems
file-system 	FFS		# UFS
file-system 	EXT2FS		# second extended file system (linux)
file-system 	MFS		# memory file system
file-system 	NFS		# Network file System client
file-system 	CD9660		# ISO 9660 + Rock Ridge file system
file-system 	MSDOSFS		# MS-DOS file system
file-system 	ADOSFS		# AmigaDOS file system
file-system 	FDESC		# /dev/fd
file-system 	KERNFS		# /kern
file-system 	NULLFS		# loopback file system
file-system 	OVERLAY		# overlay file system
file-system	PUFFS		# Userspace file systems (e.g. ntfs-3g & sshfs)
file-system 	PROCFS		# /proc
file-system 	UMAPFS		# NULLFS + uid and gid remapping
file-system 	UNION		# union file system
file-system 	NTFS		# Windows NT file system
file-system	PTYFS		# /dev/pts/N support
file-system	TMPFS		# Efficient memory file-system
#file-system	UDF		# experimental - OSTA UDF CD/DVD file-system

# File system options
options 	FFS_EI		# FFS Endian Independent support
#options 	FFS_NO_SNAPSHOT	# No FFS snapshot support
options 	QUOTA		# legacy UFS quotas
options 	QUOTA2		# new, in-filesystem UFS quotas
options 	UFS_DIRHASH	# UFS Large Directory Hashing
options 	UFS_EXTATTR	# Extended attribute support for UFS1
options 	WAPBL		# File system journaling support
options 	LFS_DIRHASH	# LFS version of UFS_DIRHASH - experimental

options 	NFS_BOOT_DHCP	# Support DHCP NFS root

# Networking options
#options 	GATEWAY		# packet forwarding
options 	INET		# IP + ICMP + TCP + UDP
options 	INET6		# IPV6

# These options enable verbose messages for several subsystems.
# Warning, these may compile large string tables into the kernel!
options 	MIIVERBOSE	# verbose PHY autoconfig messages
options 	PCIVERBOSE	# verbose PCI device autoconfig messages
#options 	PCI_CONFIG_DUMP	# verbosely dump PCI config space
options 	SCSIVERBOSE	# human readable SCSI error messages
options 	USBVERBOSE	# verbose USB device autoconfig messages

options 	WSEMUL_VT100
options 	WSDISPLAY_COMPAT_USL		# wsconscfg VT handling
options 	WS_DEFAULT_FG=WSCOL_BLACK
options 	WS_DEFAULT_BG=WSCOL_LIGHT_WHITE
options 	WS_KERNEL_FG=WSCOL_GREEN
options 	WS_KERNEL_BG=WSCOL_LIGHT_WHITE
#options 	FONT_GALLANT12x22
options 	FONT_BOLD8x16

# Kernel root file system and dump configuration
config		netbsd	root on ? type ?
#config		netbsd	root on fec0 type nfs

#
# Device configuration
#
mainbus*	at root

# CPUs
cpu*		at mainbus?

# Generic OpenFirmware console support
rtas*		at mainbus?

#
# Freescale MPC5200B on-chip peripherals (SoC bus).
#
options 	PIC_MPC5200	# SIU interrupt-routing glue in mainbus/ofwpci

mpcobio*	at mainbus?
mpc5200pic*	at mpcobio?	# SIU interrupt controller
cdm*		at mpcobio?	# clock distribution module
sram*		at mpcobio?	# on-chip SRAM (BestComm scratch)
bestcomm*	at mpcobio?	# BestComm SDMA engine
fec*		at mpcobio?	# Fast Ethernet Controller (MAC + MII)
psc*		at mpcobio?	# programmable serial controller
# Use a PSC in UART mode (PSC1) as the OpenFirmware serial console.
options 	PSC_CONSOLE
ohci*		at mpcobio?	# on-chip USB OHCI host controller
wdc*		at mpcobio?	# on-chip ATA controller (PIO mode)
#mpcaudio*	at mpcobio?	# AC97 audio (PSC2 + STAC9766, BestComm DMA)

# PCI root nodes. EFIKA uses the native MPC5200 host-bridge driver (mpcpci)
# instead of the generic ofwpci.
mpcpci*		at mainbus?
pci*		at mpcpci? bus ?

# PCI bridges
pchb*		at pci? dev ? function ?
ppb*		at pci? dev ? function ?
pcib*		at pci? dev ? function ?

# Console Devices
#genfb*		at pci? dev ? function ?
radeonfb*	at pci? dev ? function ?	# ATI Radeon
options 	RADEONFB_BIOS_INIT

veritefb*	at pci? dev ? function ?	# Rendition Verite V2100/V2200
#options 	VERITEFB_CONSOLE
#options 	VERITEFB_DEBUG

wsdisplay*      at wsemuldisplaydev?

scsibus* 	at umass?

# SCSI devices
sd*		at scsibus? target ? lun ?	# SCSI disk drives
st*		at scsibus? target ? lun ?	# SCSI tape drives
cd*		at scsibus? target ? lun ?	# SCSI CD-ROM drives
#ch*		at scsibus? target ? lun ?	# SCSI autochangers
#ss*		at scsibus? target ? lun ?	# SCSI scanners
#uk*		at scsibus? target ? lun ?	# SCSI unknown

# IDE and related devices
# PCI IDE controllers
satalink*	at pci? dev ? function ?	# Silicon Image SATALink SATA

# ATA (IDE) bus support
atabus*		at ata?

# IDE drives
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
uk*	at atapibus? drive ? flags 0x0000	# ATAPI unknown

# MII/PHY support
rlphy*	at mii? phy ?				# Realtek 8139/8201L PHYs

usb*	at ohci?				# USB bus support
uhub*	at usb?					# USB Hubs
uhub*	at uhub? port ?

# USB Mass Storage
umass*	at uhub? port ? configuration ? interface ?

uhidev*	at uhub? port ? configuration ? interface ?	# USB HID device

ums*	at uhidev? reportid ?				# USB Mice
wsmouse* at ums? mux 0

ukbd*	at uhidev? reportid ?				# USB Keyboards
wskbd*	at ukbd? console ? mux 1

ucycom*	at uhidev? reportid ?				# USB serial adapter
uhid*	at uhidev? reportid ?				# USB Generic HID

ulpt*	at uhub? port ? configuration ? interface ?	# USB Printer
#uaudio*	at uhub? port ? configuration ?		# USB audio

ugen*	at uhub? port ? configuration ? interface ?	# USB Generic driver

# Audio support
#audio*	at audiobus?

#spkr*	at audio?					# PC speaker (synthesized)
#wsbell* at spkr?

#
# accept filters
pseudo-device   accf_data		# "dataready" accept filter
pseudo-device   accf_http		# "httpready" accept filter

pseudo-device	vnd			# disk-like interface to files
#options 	VND_COMPRESSION		# compressed vnd(4)
pseudo-device	fss			# file system snapshot device
pseudo-device	md			# memory disk device
pseudo-device	loop			# network loopback
pseudo-device	bpfilter		# packet filter
pseudo-device	npf			# NPF packet filter
# NB: pppoe (and its sppp line discipline) is intentionally omitted on this board.
pseudo-device	sl			# Serial Line IP
pseudo-device	tun			# network tunneling over tty
pseudo-device	tap			# virtual Ethernet
#pseudo-device	gre			# generic L3 over IP tunnel
pseudo-device	gif			# IPv[46] over IPv[46] tunnel (RFC1933)
#pseudo-device	faith			# IPv[46] tcp relay translation i/f
pseudo-device	stf			# 6to4 IPv6 over IPv4 encapsulation
pseudo-device	vlan			# IEEE 802.1q encapsulation
pseudo-device	bridge			# simple inter-network bridging
pseudo-device	vether			# Virtual Ethernet for bridge
pseudo-device	agr			# IEEE 802.3ad link aggregation
pseudo-device	pty			# pseudo-terminals
pseudo-device	clockctl		# user control of clock subsystem
pseudo-device	openfirm		# /dev/openfirm
pseudo-device	ksyms			# /dev/ksyms
pseudo-device	wsmux			# mouse and keyboard multiplexor
pseudo-device	putter			# for puffs and pud
pseudo-device 	swwdog			# software watchdog timer -- swwdog(4)

# userland interface to drivers, including autoconf and properties retrieval
pseudo-device	drvctl

include "dev/veriexec.config"

# Pull in optional local configuration - always at end
cinclude	"arch/ofppc/conf/EFIKA.local"
