# 9k risc-v cpu server for hifive unmatched in rv64
dev +dev
	root
	cons
	arch
	env
	pipe
	proc
	mnt
	srv
	dup
#	rtc
	ssl
	tls
	cap
#	pnp		pci
	kprof
	segment
	ether		netif
	ip		arp chandial ip ipv6 ipaux iproute netlog nullmedium pktmedium
	uart
	bridge		log
	sd
# needed for usb kbd input via scan codes
#	kbin
#	usb

sd +dev
#	sdmmc		sdpf	# don't know what the unmatched provides
#	sdahci		pci sdscsi
#	sdnvme		pci sdscsi

uart +dev
	uartsifive

ip +dev
	tcp
	udp
	ipifc
	icmp
	icmp6
#	ipmux

link +dev
	ethergem
	ethermedium
	loopbackmedium
	netdevmedium
#	usbehci		usbehcipc

misc +dev
	cache

boot cpu
	tcp

rootdir
	boot$CONF.out		boot
	/riscv64/bin/auth/factotum
	/riscv64/bin/ip/ipconfig
	/cfg/example/nvram.coll	nvram

conf
	#include "riscv64.h"

	int cpuserver = 1;
	uvlong cpuhz = 1200*1000*1000;	/* rdtsc tick freq */
	uvlong timebase = 1000*1000;	/* clint tick freq */
	Membank membanks[] = {		/* (address, size) pairs */
		PHYSMEM, BANK0SIZE,	/* don't move Sys thus reboottramp */
		PHYSMEM+BANK0SIZE, 15ULL*GB,
		0
	};
	char defnvram[] = "/boot/nvram";

	uintptr uartregs[] = { PAUart0 };
	int nuart = nelem(uartregs);
	vlong uartfreq = 150000000;	/* wild guess; same as pf */
	int prmsdelay = 100;

	uchar ether0mac[] = { 0x70, 0xb3, 0xd5, 0x92, 0xf8, 0xc0, };

	Soc soc = {
		.ether[0]= (char *)0x10090000,
		.l2cache = (char *)0x02010000,	/* common */
	//	.pci	 = (char *)0x60000000,	/* ecam for cfg space */
	//	.pcictl  = (char *)0x100d0000,	/* bridge, ctrl regs */
		.plic    = (char *)0x0c000000,	/* common */
		.sdmmc   = (char *)0x10050000,
		.hobbled = 1,			/* mgmt hart 0 */
		.idlewakens = 1,		/* send IPIs to wake wfi cpus */
	};
	Ioconf ioconfs[] = {	/* devices whose drivers vmap their regs */
		{ "ether", 2*PGSZ, &soc.ether[0], 55, },
		0
	};
	Ioconf socconf[] = { /* devices without drivers that vmap their regs */
		{ "clint", 64*KB, &soc.clint, },
		{ "l2cache", PGSZ, &soc.l2cache, },
	//	{ "pci",   2*MB, &soc.pci, 56, },	/* pcie ecam cfg */
	//	{ "pcictl", 4*8*KB, &soc.pcictl, },	/* pcie br & ctl */
		{ "plic",  64*MB, &soc.plic, },		/* common */
		{ "uart",  PGSZ, &soc.uart, 39, },
		{ "sdmmc", PGSZ, &soc.sdmmc, 43, },
		0
	};

riscv64
	start
	low
	mach
	mtrap
	strap
	mch
	main
	allocb
	arch
	archrv
	color
	csr
	dmamalloc
	fp
	fpu
	ioconf
#	kbd
	map
	memory
	mmu
	fakepci
	fakeptenc
	sane
	sbi
	sbicall
	sbiecall
	plic
	trap
port
	alarm
	awaitbit
	byteserial
	chan
	ctype
	dev
	devtab
	edf
	fault
	image
#	latin1
	logpow
	page
	parse
	pgrp
	portclock
	prf
	print
	proc
	ps
	qio
	qlock
	qmalloc
	random
	rebootcmd
	segment
	sysauth
	syscall
	syscallfmt
	sysfile
	sysproc
	sysseg
	systab
	taslock
	tod
	watermarks

# controls which directories to look in for source files; must be relative to ..
dir
	ip
	port
	../9/port
