summaryrefslogtreecommitdiffstats
path: root/sys/mips
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2008-04-13 07:07:57 +0000
committerimp <imp@FreeBSD.org>2008-04-13 07:07:57 +0000
commit49872b4cfffb3ba15429b1d5c532d570bd29c0a5 (patch)
treec6852b1e25723004e8b0315e731c14cbc8001b98 /sys/mips
parente1b67c923aa00ebbb0f57277fa6fff90a2b80d75 (diff)
downloadFreeBSD-src-49872b4cfffb3ba15429b1d5c532d570bd29c0a5.zip
FreeBSD-src-49872b4cfffb3ba15429b1d5c532d570bd29c0a5.tar.gz
FreeBSD/mips port. The FreeBSD/mips port targets mips32, mips64,
mips32r2 and mips64r2 (and close relatives) processors. There presently is support for ADMtek ADM5120, A mips 4Kc in a malta board, the RB533 routerboard (based on IDT RC32434) and some preliminary support for sibtye/broadcom designs. Other hardware support will be forthcomcing. This port boots multiuser under gxemul emulating the malta board and also bootstraps on the hardware whose support is forthcoming... Oleksandr Tymoshenko, Wojciech Koszek, Warner Losh, Olivier Houchard, Randall Stewert and others that have contributed to the mips2 and/or mips2-jnpr perforce branches. Juniper contirbuted a generic mips port late in the life cycle of the misp2 branch. Warner Losh merged the mips2 and Juniper code bases, and others list above have worked for the past several months to get to multiuser. In addition, the mips2 work owe a debt to the trail blazing efforts of the original mips branch in perforce done by Juli Mallett.
Diffstat (limited to 'sys/mips')
-rw-r--r--sys/mips/compile/.cvsignore1
-rw-r--r--sys/mips/conf/ADM512071
-rw-r--r--sys/mips/conf/ADM5120.hints24
-rw-r--r--sys/mips/conf/IDT54
-rw-r--r--sys/mips/conf/IDT.hints22
-rw-r--r--sys/mips/conf/MALTA72
-rw-r--r--sys/mips/conf/MALTA.hints5
-rw-r--r--sys/mips/conf/QEMU58
-rw-r--r--sys/mips/conf/SENTRY599
-rw-r--r--sys/mips/conf/SENTRY5.hints5
10 files changed, 411 insertions, 0 deletions
diff --git a/sys/mips/compile/.cvsignore b/sys/mips/compile/.cvsignore
new file mode 100644
index 0000000..232298e
--- /dev/null
+++ b/sys/mips/compile/.cvsignore
@@ -0,0 +1 @@
+[A-Za-z0-9]*
diff --git a/sys/mips/conf/ADM5120 b/sys/mips/conf/ADM5120
new file mode 100644
index 0000000..7e22b87
--- /dev/null
+++ b/sys/mips/conf/ADM5120
@@ -0,0 +1,71 @@
+# QEMU -- Generic kernel configuration file for FreeBSD/mips
+#
+# For more information on this file, please read 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$
+
+machine mips
+ident ADM5120
+
+#makeoptions ARCH_FLAGS=-march=mips32
+makeoptions MIPS_LITTLE_ENDIAN=defined
+
+# Don't build any modules yet.
+makeoptions MODULES_OVERRIDE=""
+
+options KERNVIRTADDR=0x80100000
+include "../mips32/adm5120/std.adm5120"
+
+hints "ADM5120.hints" #Default places to look for devices.
+
+makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols
+
+options DDB
+options KDB
+
+options SCHED_4BSD #4BSD scheduler
+options INET #InterNETworking
+options NFSCLIENT #Network Filesystem Client
+options NFS_ROOT #NFS usable as /, requires NFSCLIENT
+options PSEUDOFS #Pseudo-filesystem framework
+# options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions
+
+options BOOTP
+options BOOTP_NFSROOT
+options BOOTP_NFSV3
+options BOOTP_WIRED_TO=admsw0
+options BOOTP_COMPAT
+
+# options FFS #Berkeley Fast Filesystem
+# options SOFTUPDATES #Enable FFS soft updates support
+# options UFS_ACL #Support for access control lists
+# options UFS_DIRHASH #Improve performance on big directories
+options ROOTDEVNAME=\"nfs:10.0.0.1:/mnt/bsd\"
+
+
+# Debugging for use in -current
+options INVARIANTS #Enable calls of extra sanity checking
+options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS
+#options WITNESS #Enable checks to detect deadlocks and cycles
+#options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed
+
+device genclock
+device loop
+device ether
+device uart
+# device md
+# device mem
+# device uart_ns8250
diff --git a/sys/mips/conf/ADM5120.hints b/sys/mips/conf/ADM5120.hints
new file mode 100644
index 0000000..1c8af41
--- /dev/null
+++ b/sys/mips/conf/ADM5120.hints
@@ -0,0 +1,24 @@
+# $FreeBSD$
+# device.hints
+hint.obio.0.at="nexus0"
+hint.obio.0.maddr=0x0
+hint.obio.0.msize=0x1fffffff
+
+# host-to-pci bridge
+hint.pcib.0.at="obio0"
+hint.pcib.0.maddr=0x11400000
+hint.pcib.0.msize=0x100000
+hint.pcib.0.io=0x11500000
+hint.pcib.0.iosize=0x100000
+
+# on-board switch engine
+hint.admsw.0.at="obio0"
+hint.admsw.0.maddr=0x12000000
+hint.admsw.0.msize=0x200000
+hint.admsw.0.irq=9
+
+# uart0
+hint.uart.0.at="obio0"
+hint.uart.0.maddr=0x12600000
+hint.uart.0.msize=0x200000
+hint.uart.0.irq=1
diff --git a/sys/mips/conf/IDT b/sys/mips/conf/IDT
new file mode 100644
index 0000000..8b63260
--- /dev/null
+++ b/sys/mips/conf/IDT
@@ -0,0 +1,54 @@
+# $FreeBSD$
+
+machine mips
+cpu CPU_MIPS4KC
+ident RB532
+
+# Don't build any modules yet.
+makeoptions MODULES_OVERRIDE=""
+
+include "../mips32/idt/std.idt"
+hints "IDT.hints" #Default places to look for devices.
+
+makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols
+
+options DDB
+options KDB
+
+options SCHED_4BSD #4BSD scheduler
+options INET #InterNETworking
+options NFSCLIENT #Network Filesystem Client
+options NFS_ROOT #NFS usable as /, requires NFSCLIENT
+options PSEUDOFS #Pseudo-filesystem framework
+
+options BOOTP
+options BOOTP_NFSROOT
+options BOOTP_NFSV3
+options BOOTP_WIRED_TO=kr0
+options BOOTP_COMPAT
+
+# Debugging for use in -current
+options INVARIANTS #Enable calls of extra sanity checking
+options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS
+
+device genclock
+device loop
+device pci
+device ether
+device miibus
+device vr
+device kr
+device uart
+device uart_ns8250
+device md
+
+# Wireless NIC cards
+device wlan # 802.11 support
+device wlan_wep # 802.11 WEP support
+device wlan_tkip # 802.11 TKIP support
+device wlan_scan_ap #802.11 AP mode scanning
+device wlan_scan_sta #802.11 STA mode scanning
+device ath # Atheros pci/cardbus NIC's
+device ath_hal # Atheros HAL (Hardware Access Layer)
+device ath_rate_sample # SampleRate tx rate control for ath
+options ATH_DEBUG
diff --git a/sys/mips/conf/IDT.hints b/sys/mips/conf/IDT.hints
new file mode 100644
index 0000000..eae6fbb
--- /dev/null
+++ b/sys/mips/conf/IDT.hints
@@ -0,0 +1,22 @@
+# $FreeBSD$
+# device.hints
+hint.obio.0.at="nexus0"
+hint.obio.0.maddr=0x0
+hint.obio.0.msize=0x1fffffff
+
+# host-to-pci bridge
+hint.pcib.0.at="obio0"
+# hint.pcib.0.maddr=0x11400000
+# hint.pcib.0.msize=0x100000
+# hint.pcib.0.io=0x11500000
+# hint.pcib.0.iosize=0x100000
+
+# uart0
+hint.uart.0.at="obio0"
+hint.uart.0.maddr=0x18058000
+hint.uart.0.msize=0x1C
+hint.uart.0.irq=104
+
+hint.kr.0.at="obio0"
+hint.kr.0.maddr=0x18060000
+hint.kr.0.msize=0x10000
diff --git a/sys/mips/conf/MALTA b/sys/mips/conf/MALTA
new file mode 100644
index 0000000..2f3e39a
--- /dev/null
+++ b/sys/mips/conf/MALTA
@@ -0,0 +1,72 @@
+# QEMU -- Generic kernel configuration file for FreeBSD/mips
+#
+# For more information on this file, please read 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$
+
+machine mips
+ident MALTA
+
+#makeoptions ARCH_FLAGS=-march=mips32
+makeoptions MIPS_LITTLE_ENDIAN=defined
+
+options YAMON
+
+# Don't build any modules yet.
+makeoptions MODULES_OVERRIDE=""
+
+options KERNVIRTADDR=0x80100000
+options TICK_USE_YAMON_FREQ=defined
+#options TICK_USE_MALTA_RTC=defined
+
+include "../mips32/malta/std.malta"
+
+hints "MALTA.hints" #Default places to look for devices.
+
+makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols
+
+options DDB
+options KDB
+
+options SCHED_4BSD #4BSD scheduler
+options INET #InterNETworking
+options NFSCLIENT #Network Filesystem Client
+options NFS_ROOT #NFS usable as /, requires NFSCLIENT
+options PSEUDOFS #Pseudo-filesystem framework
+options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions
+
+options FFS #Berkeley Fast Filesystem
+options SOFTUPDATES #Enable FFS soft updates support
+options UFS_ACL #Support for access control lists
+options UFS_DIRHASH #Improve performance on big directories
+options ROOTDEVNAME=\"ufs:ad0s1a\"
+
+
+# Debugging for use in -current
+options INVARIANTS #Enable calls of extra sanity checking
+options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS
+#options WITNESS #Enable checks to detect deadlocks and cycles
+#options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed
+
+device genclock
+device loop
+device ether
+device le
+device miibus
+device md
+device mem
+device uart
+device uart_ns8250
diff --git a/sys/mips/conf/MALTA.hints b/sys/mips/conf/MALTA.hints
new file mode 100644
index 0000000..72dd107
--- /dev/null
+++ b/sys/mips/conf/MALTA.hints
@@ -0,0 +1,5 @@
+# $FreeBSD$
+# device.hints
+# hint.uart.0.at="nexus"
+# hint.uart.0.maddr="0x180003f8"
+# hint.uart.0.flags="0x90"
diff --git a/sys/mips/conf/QEMU b/sys/mips/conf/QEMU
new file mode 100644
index 0000000..1bfad14
--- /dev/null
+++ b/sys/mips/conf/QEMU
@@ -0,0 +1,58 @@
+# QEMU -- Generic kernel configuration file for FreeBSD/mips
+#
+# For more information on this file, please read 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$
+
+machine mips
+cpu CPU_MIPS32
+ident QEMU
+
+# XXX: These two options must be defined in MIPS kernel configs.
+makeoptions MIPS_LITTLE_ENDIAN=defined
+makeoptions ARCH_FLAGS=-march=mips32
+
+# Don't build any modules yet.
+makeoptions MODULES_OVERRIDE=""
+
+options KERNVIRTADDR=0x80100000
+include "../adm5120/std.adm5120"
+
+#hints "GENERIC.hints" #Default places to look for devices.
+
+makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols
+
+options DDB
+options KDB
+
+options SCHED_4BSD #4BSD scheduler
+options INET #InterNETworking
+options NFSCLIENT #Network Filesystem Client
+options NFS_ROOT #NFS usable as /, requires NFSCLIENT
+options PSEUDOFS #Pseudo-filesystem framework
+options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions
+
+# Debugging for use in -current
+#options INVARIANTS #Enable calls of extra sanity checking
+#options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS
+#options WITNESS #Enable checks to detect deadlocks and cycles
+#options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed
+
+device genclock
+device loop
+device ether
+device mem
+device md
diff --git a/sys/mips/conf/SENTRY5 b/sys/mips/conf/SENTRY5
new file mode 100644
index 0000000..0db4cf7
--- /dev/null
+++ b/sys/mips/conf/SENTRY5
@@ -0,0 +1,99 @@
+#
+# $FreeBSD$
+# $P4: //depot/projects/mips2-jnpr/src/sys/mips/conf/SENTRY5#2 $
+#
+# The Broadcom Sentry5 series of processors and boards is very commonly
+# used in COTS hardware including the Netgear WGT634U.
+#
+# Some tweaks are needed for use with this platform:
+#
+# * CFE firmware's ELF loader expects an ELF kernel which is linked so as
+# not to contain offsets in PT_LOAD which point behind the actual offset
+# of that PT header. FreeBSD normally links the first PT_LOAD header to
+# begin at offset 0.
+#
+# * Broadcom's support package for the internal bus, the Sonics
+# SiliconBackplane, needs to be integrated to detect and probe hardware
+# correctly.
+#
+# * The clock needs to be calibrated correctly, so that DELAY() may work.
+# One problem with this is that the low-level printf() routine calls DELAY(),
+# which currently causes divide-by-zero trap
+#
+# * The Broadcom CPUs have no FPU. Attempting to detect one by reading CP1's
+# status register causes an unhandled boot-time exception. An FPU emulator
+# will be necessary to support multi-user boot.
+#
+
+machine mips
+ident SENTRY5
+cpu CPU_MIPS4KC
+options CPU_NOFPU
+options ISA_MIPS32
+options CPU_SENTRY5 # XXX should this be a
+ # sub-cpu option?
+
+# XXX only siba should be hardwired for now; we will use
+# bus enumeration there
+files "../mips32/sentry5/files.sentry5"
+hints "SENTRY5.hints"
+
+# sentry5 normally ships with cfe firmware; use the console for now
+options CFE
+options CFE_CONSOLE
+options ALT_BREAK_TO_DEBUGGER
+
+# cfe loader expects kernel at 0x80001000 for mips32 w/o backwards
+# offsets in the linked elf image (see ldscript hack)
+# XXX can we conditionalize the linker stuff on options CFE?
+options KERNVIRTADDR=0x80001000
+
+#makeoptions ARCH_FLAGS=-march=mips32
+makeoptions MIPS_LITTLE_ENDIAN=defined
+makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols
+makeoptions MODULES_OVERRIDE=""
+
+options DDB
+options KDB
+
+options SCHED_4BSD #4BSD scheduler
+options INET #InterNETworking
+options NFSCLIENT #Network Filesystem Client
+options NFS_ROOT #NFS usable as /, requires NFSCLIENT
+options PSEUDOFS #Pseudo-filesystem framework
+options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions
+
+# Debugging for use in -current
+options INVARIANTS
+options INVARIANT_SUPPORT
+
+#options BUS_DEBUG
+#makeoptions BUS_DEBUG
+
+device siba # Sonics SiliconBackplane
+device pci # siba_pcib
+
+device bfe # XXX will build both pci and siba
+device miibus # attachments
+
+# pci devices
+# notyet:
+#device ath # in pci slot
+#device ath_hal # in pci slot
+
+device usb # USB Bus (required)
+device uhci # UHCI PCI->USB interface
+device ehci # EHCI PCI->USB interface (USB 2.0)
+
+# need to teach the code to ignore the bridge....
+
+
+# XXX notyet; need to be auto probed children of siba_cc.
+#device uart
+#device uart_ns8250
+
+device genclock
+device loop
+device ether
+device md
+device mem
diff --git a/sys/mips/conf/SENTRY5.hints b/sys/mips/conf/SENTRY5.hints
new file mode 100644
index 0000000..0ee471e
--- /dev/null
+++ b/sys/mips/conf/SENTRY5.hints
@@ -0,0 +1,5 @@
+# $FreeBSD$
+hint.siba.0.at="nexus0"
+hint.siba.0.maddr="0x18000000"
+hint.siba.0.msize="0x1000"
+# XXX irq?
OpenPOWER on IntegriCloud