summaryrefslogtreecommitdiffstats
path: root/sys/riscv
diff options
context:
space:
mode:
authorbr <br@FreeBSD.org>2016-04-26 13:22:08 +0000
committerbr <br@FreeBSD.org>2016-04-26 13:22:08 +0000
commit0fbd3fd28dd303a812640fec118ec45d16bb7a1b (patch)
tree99d2effb8c70e416f0f7f673beb5cddb2a324417 /sys/riscv
parentd609088cbb4f183c1daf6b1250a3941f996206ee (diff)
downloadFreeBSD-src-0fbd3fd28dd303a812640fec118ec45d16bb7a1b.zip
FreeBSD-src-0fbd3fd28dd303a812640fec118ec45d16bb7a1b.tar.gz
o Add device tree files and kernel configuration files
for RISC-V cpus synthesized on FPGA hardware. o Include new files to the build.
Diffstat (limited to 'sys/riscv')
-rw-r--r--sys/riscv/conf/GENERIC2
-rw-r--r--sys/riscv/conf/LOWRISC43
-rw-r--r--sys/riscv/conf/LOWRISC.hints5
-rw-r--r--sys/riscv/conf/QEMU3
-rw-r--r--sys/riscv/conf/ROCKET29
-rw-r--r--sys/riscv/conf/SPIKE3
6 files changed, 83 insertions, 2 deletions
diff --git a/sys/riscv/conf/GENERIC b/sys/riscv/conf/GENERIC
index e909fc8..861a3c4 100644
--- a/sys/riscv/conf/GENERIC
+++ b/sys/riscv/conf/GENERIC
@@ -90,8 +90,6 @@ options INVARIANT_SUPPORT # Extra sanity checks of internal structures, require
# options WITNESS # Enable checks to detect deadlocks and cycles
# options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed
options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones
-
-options ROOTDEVNAME=\"ufs:/dev/htif_blk0\"
# options EARLY_PRINTF
# Pseudo devices.
diff --git a/sys/riscv/conf/LOWRISC b/sys/riscv/conf/LOWRISC
new file mode 100644
index 0000000..f4a9c69
--- /dev/null
+++ b/sys/riscv/conf/LOWRISC
@@ -0,0 +1,43 @@
+#
+# Kernel configuration file for lowRISC.
+#
+# For more information on this file, please read the config(5) manual page,
+# and/or the handbook section on Kernel Configuration Files:
+#
+# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html
+#
+# The handbook is also available locally in /usr/share/doc/handbook
+# if you've installed the doc distribution, otherwise always see the
+# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the
+# latest information.
+#
+# An exhaustive list of options and more detailed explanations of the
+# device lines is also present in the ../../conf/NOTES and NOTES files.
+# If you are in doubt as to the purpose or necessity of a line, check first
+# in NOTES.
+#
+# $FreeBSD$
+
+include GENERIC
+ident LOWRISC
+
+hints "LOWRISC.hints"
+
+options ROOTDEVNAME=\"ufs:mmcsd0s2\"
+
+# MMC/SD
+device mmc
+device mmcsd
+# device mmc_spi
+
+# SPI
+device spibus
+device xilinx_spi
+
+# Serial (COM) ports
+device uart # Generic UART driver
+device uart_ns8250 # ns8250-type UART driver
+
+# RISCVTODO: This needs to be done via loader (when it's available).
+options FDT_DTB_STATIC
+makeoptions FDT_DTS_FILE=lowrisc.dts
diff --git a/sys/riscv/conf/LOWRISC.hints b/sys/riscv/conf/LOWRISC.hints
new file mode 100644
index 0000000..f8ed5ff
--- /dev/null
+++ b/sys/riscv/conf/LOWRISC.hints
@@ -0,0 +1,5 @@
+# $FreeBSD$
+
+# MMC device
+hint.mmc_spi.0.at="spibus0"
+hint.mmc_spi.0.cs=0
diff --git a/sys/riscv/conf/QEMU b/sys/riscv/conf/QEMU
index f04075a..26c6543 100644
--- a/sys/riscv/conf/QEMU
+++ b/sys/riscv/conf/QEMU
@@ -21,6 +21,9 @@
include GENERIC
ident QEMU
+device htif
+options ROOTDEVNAME=\"ufs:/dev/htif_blk0\"
+
# RISCVTODO: This needs to be done via loader (when it's available).
options FDT_DTB_STATIC
makeoptions FDT_DTS_FILE=qemu.dts
diff --git a/sys/riscv/conf/ROCKET b/sys/riscv/conf/ROCKET
new file mode 100644
index 0000000..9a9e3ef
--- /dev/null
+++ b/sys/riscv/conf/ROCKET
@@ -0,0 +1,29 @@
+#
+# Kernel configuration file for Rocket Core.
+#
+# For more information on this file, please read the config(5) manual page,
+# and/or the handbook section on Kernel Configuration Files:
+#
+# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html
+#
+# The handbook is also available locally in /usr/share/doc/handbook
+# if you've installed the doc distribution, otherwise always see the
+# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the
+# latest information.
+#
+# An exhaustive list of options and more detailed explanations of the
+# device lines is also present in the ../../conf/NOTES and NOTES files.
+# If you are in doubt as to the purpose or necessity of a line, check first
+# in NOTES.
+#
+# $FreeBSD$
+
+include GENERIC
+ident ROCKET
+
+device htif
+options ROOTDEVNAME=\"ufs:/dev/htif_blk0\"
+
+# RISCVTODO: This needs to be done via loader (when it's available).
+options FDT_DTB_STATIC
+makeoptions FDT_DTS_FILE=rocket.dts
diff --git a/sys/riscv/conf/SPIKE b/sys/riscv/conf/SPIKE
index 583d5a9..6c4a743 100644
--- a/sys/riscv/conf/SPIKE
+++ b/sys/riscv/conf/SPIKE
@@ -21,6 +21,9 @@
include GENERIC
ident SPIKE
+device htif
+options ROOTDEVNAME=\"ufs:/dev/htif_blk0\"
+
# RISCVTODO: This needs to be done via loader (when it's available).
options FDT_DTB_STATIC
makeoptions FDT_DTS_FILE=spike.dts
OpenPOWER on IntegriCloud