diff options
author | Per Fogelstrom <pefo@cvs.openbsd.org> | 1997-02-06 16:02:48 +0000 |
---|---|---|
committer | Per Fogelstrom <pefo@cvs.openbsd.org> | 1997-02-06 16:02:48 +0000 |
commit | 8a091f472ca262aca4d0e922a0e313259359681d (patch) | |
tree | b4d26db683b405c63989ccecc3840da916abe1d4 /sys/arch/wgrisc/conf | |
parent | e9cbad18615f2e1fe42a5075063877f29370c0f8 (diff) |
Import of WGRISC port. (Willowglen R3081 board)
Diffstat (limited to 'sys/arch/wgrisc/conf')
-rw-r--r-- | sys/arch/wgrisc/conf/DISKLESS | 77 | ||||
-rw-r--r-- | sys/arch/wgrisc/conf/GENERIC | 124 | ||||
-rw-r--r-- | sys/arch/wgrisc/conf/Makefile.wgrisc | 183 | ||||
-rw-r--r-- | sys/arch/wgrisc/conf/files.wgrisc | 106 | ||||
-rw-r--r-- | sys/arch/wgrisc/conf/ld.script | 74 |
5 files changed, 564 insertions, 0 deletions
diff --git a/sys/arch/wgrisc/conf/DISKLESS b/sys/arch/wgrisc/conf/DISKLESS new file mode 100644 index 00000000000..744607c9c24 --- /dev/null +++ b/sys/arch/wgrisc/conf/DISKLESS @@ -0,0 +1,77 @@ +# +# Generic configuration file for MIPS R4400 PICA system +# + +machine riscpc + +maxusers 8 + +# does not really do anything anymore, but this replaces "ident GENERIC" +#options GENERIC + +# Need to set locally +options TIMEZONE="8*60" # minutes west of GMT (for) +options DST=1 # use daylight savings rules + +# Standard system options +options SWAPPAGER # swap pager (anonymous and swap space) +options VNODEPAGER # vnode pager (mapped files) +options DEVPAGER # device pager (mapped devices) +options DIAGNOSTIC # extra kernel debugging checks +options DEBUG # extra kernel debugging support +options "COMPAT_43" # compatibility with 4.3BSD binaries +#options KTRACE # system call tracing support +options "NKMEMCLUSTERS=1024" # 4K pages in kernel malloc pool +#options KGDB # support for kernel gdb +#options "KGDBRATE=19200" # kernel gdb port rate (default 9600) +#options "KGDBDEV=15*256+0" # device for kernel gdb + +# System V options +options SYSVMSG # System V-like message queues +options SYSVSEM # System V-like semaphores +options SYSVSHM # System V-like memory sharing +options SHMMAXPGS=1024 # 1024 pages is the default +options NATIVE_ELF + +# Filesystem options +options FIFO # POSIX fifo support (in all filesystems) +options FFS,QUOTA # fast filesystem with user and group quotas +options MFS # memory-based filesystem +options NFSCLIENT # Sun NFS-compatible filesystem (client) +options NFSSERVER # Sun NFS-compatible filesystem (server) +options KERNFS # kernel data-structure filesystem +#options MSDOSFS # Ability to read write MS-Dos filsystem +#options CD9660 # ISO 9660 + Rock Ridge file system +options FDESC # user file descriptor filesystem +#options UMAPFS # uid/gid remapping filesystem +#options NULLFS # null layer filesystem +#options LFS # Log-based filesystem (still experimental) +#options PORTAL # portal filesystem (still experimental) + +# Networking options +options INET # Internet protocols +options "TCP_COMPAT_42" # compatibility with 4.2BSD TCP/IP +options GATEWAY # IP packet forwarding +#options MULTICAST # Multicast support +#options MROUTING # Multicast routing support +#options ISO # OSI networking +#options TPIP +#options EON + +config bsd root on nfs swap on nfs + +mainbus0 at root +cpu* at mainbus0 + +pica* at mainbus0 +clock0 at pica? +com0 at pica? +com1 at pica? +sn0 at pica? + +pseudo-device sl 2 # serial-line IP ports +pseudo-device ppp 2 # serial-line PPP ports +pseudo-device pty 64 # pseudo ptys +pseudo-device bpfilter 16 # packet filter ports +pseudo-device loop +pseudo-device vnd 4 # virtual disk diff --git a/sys/arch/wgrisc/conf/GENERIC b/sys/arch/wgrisc/conf/GENERIC new file mode 100644 index 00000000000..ca3772e008b --- /dev/null +++ b/sys/arch/wgrisc/conf/GENERIC @@ -0,0 +1,124 @@ +# $OpenBSD: GENERIC,v 1.1 1997/02/06 16:02:45 pefo Exp $ +# +# Generic configuration file for Willowglen RISC-PC 9100 +# + +machine wgrisc + +maxusers 8 + +# Need to set locally +options TIMEZONE=0 # minutes west of GMT (for) +options DST=0 # use daylight savings rules + +# Standard system options +options SWAPPAGER # swap pager (anonymous and swap space) +options DEVPAGER # device pager (mapped devices) + +options DIAGNOSTIC # extra kernel debugging checks +options KTRACE # system call tracing support +options DEBUG # extra kernel debugging support +options COMPAT_43 # compatibility with 4.3BSD binaries + +# System V options +#options SYSVMSG # System V-like message queues +#options SYSVSEM # System V-like semaphores +#options SYSVSHM # System V-like memory sharing +options SHMMAXPGS=1024 # 1024 pages is the default +options NATIVE_ELF # Arc systems uses ELF as native format + +# Filesystem options +#options CD9660 # ISO 9660 + Rock Ridge file system +#options FDESC # user file descriptor filesystem (/dev/fd) +options FIFO # POSIX fifo support (in all filesystems) +options FFS,QUOTA # fast filesystem with user and group quotas +#options KERNFS # kernel data-structure filesystem +#options LFS # Log-based filesystem (still experimental) +#options MFS # memory-based filesystem +#options MSDOSFS # Ability to read write MS-Dos filsystem +options NFSCLIENT # Sun NFS-compatible filesystem (client) +#options NFSSERVER # Sun NFS-compatible filesystem (server) +#options NULLFS # null layer filesystem +#options PORTAL # portal filesystem (still experimental) +#options PROCFS # /proc +#options UMAPFS # uid/gid remapping filesystem +#options UNION # union file system + + +# Networking options +#options GATEWAY # IP packet forwarding +options INET # Internet protocols +#options NS # XNS +#options IPX # IPX+SPX +#options ISO,TPIP # OSI networking +#options EON # OSI tunneling over IP +#options CCITT,LLC,HDLC # X.25 +#options IPFILTER # IP packet filter for security + +#options TCP_COMPAT_42 # compatibility with 4.2BSD TCP/IP +#options MULTICAST # Multicast support +#options MROUTING # Multicast routing support + +# Special options +options MACHINE_NONCONTIG # Support noncontigous memory. +options CONADDR=0xae400000 # serial console I/O address. + +# Specify storage configuration (its a joke..) +config bsd swap generic + +# +# Definition of system +# +mainbus0 at root +cpu* at mainbus0 + +riscbus* at mainbus0 +isabr* at mainbus0 + +clock0 at riscbus? +com0 at riscbus? +com1 at riscbus? +com2 at riscbus? +com3 at riscbus? +#sn0 at riscbus? + +asc0 at riscbus? +scsibus* at asc? + +# +# ISA Bus. +# + +isa* at isabr? + +com4 at isa? port 0x3e8 irq 4 +com5 at isa? port 0x2e8 irq 3 + +ep0 at isa? port ? irq ? # 3C509 ethernet cards +#ed0 at isa? port 0x280 iomem 0xd0000 irq 9 # WD/SMC, 3C503, and NE[12]000 +#ed1 at isa? port 0x250 iomem 0xd8000 irq 9 # ethernet cards +#ed2 at isa? port 0x300 iomem 0xcc000 irq 10 # + +# +# SCSI Bus devices +# + +sd* at scsibus? target ? lun ? +#st* at scsibus? target ? lun ? +#cd* at scsibus? target ? lun ? +#ch* at scsibus? target ? lun ? +#ss* at scsibus? target ? lun ? +#uk* at scsibus? target ? lun ? + +# +pseudo-device loop 1 # network loopback +pseudo-device bpfilter 8 # packet filter ports +#pseudo-device sl 2 # serial-line IP ports +#pseudo-device ppp 2 # serial-line PPP ports +#pseudo-device tun 2 # network tunneling over tty + +pseudo-device pty 64 # pseudo ptys +pseudo-device tb 1 # tablet line discipline +pseudo-device vnd 4 # paging to files +#pseudo-device ccd 4 # concatenated disk devices + diff --git a/sys/arch/wgrisc/conf/Makefile.wgrisc b/sys/arch/wgrisc/conf/Makefile.wgrisc new file mode 100644 index 00000000000..ba4cb657c57 --- /dev/null +++ b/sys/arch/wgrisc/conf/Makefile.wgrisc @@ -0,0 +1,183 @@ +# $OpenBSD: Makefile.wgrisc,v 1.1 1997/02/06 16:02:45 pefo Exp $ + +# @(#)Makefile.wgrisc 8.2 (Berkeley) 2/16/94 +# +# Makefile for 4.4 BSD +# +# This makefile is constructed from a machine description: +# config machineid +# Most changes should be made in the machine description +# /sys/arch/MACHINE/conf/``machineid'' +# after which you should do +# config machineid +# Machine generic makefile changes should be made in +# /sys/arch/MACHINE/conf/Makefile.``machinetype'' +# after which config should be rerun for all machines of that type. +# +# N.B.: NO DEPENDENCIES ON FOLLOWING FLAGS ARE VISIBLE TO MAKEFILE +# IF YOU CHANGE THE DEFINITION OF ANY OF THESE RECOMPILE EVERYTHING +# +# -DTRACE compile in kernel tracing hooks +# -DQUOTA compile in file system quotas + + +# DEBUG is set to -g by config if debugging is requested (config -g). +# PROF is set to -pg by config if profiling is requested (config -p). +AS?= as +CC?= cc +CPP?= cpp +LD?= ld +STRIP?= strip -d +TOUCH?= touch -f -c + +# source tree is located via $S relative to the compilation directory +S= ../../../.. +WGRISC= ../.. + +INCLUDES= -I. -I$S/arch -I$S +CPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL -Dwgrisc +CFLAGS= ${DEBUG} -O2 -Werror -mno-abicalls -mips1 -mcpu=r3000 +AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE + +### find out what to use for libkern +.include "$S/lib/libkern/Makefile.inc" +.ifndef PROF +LIBKERN= ${KERNLIB} +.else +LIBKERN= ${KERNLIB_PROF} +.endif + +### find out what to use for libcompat +.include "$S/compat/common/Makefile.inc" +.ifndef PROF +LIBCOMPAT= ${COMPATLIB} +.else +LIBCOMPAT= ${COMPATLIB_PROF} +.endif + +# compile rules: rules are named ${TYPE}_${SUFFIX}${CONFIG_DEP} +# where TYPE is NORMAL, DRIVER, or PROFILE}; SUFFIX is the file suffix, +# capitalized (e.g. C for a .c file), and CONFIG_DEP is _C if the file +# is marked as config-dependent. + +USRLAND_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $< +USRLAND_C_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} ${PARAM} -c $< + +NORMAL_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $< +NORMAL_C_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} ${PARAM} -c $< + +DRIVER_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $< +DRIVER_C_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} ${PARAM} -c $< + +NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $< +NORMAL_S_C= ${AS} ${COPTS} ${PARAM} $< -o $@ + +%OBJS + +%CFILES + +%SFILES + +# load lines for config "xxx" will be emitted as: +# xxx: ${SYSTEM_DEP} swapxxx.o +# ${SYSTEM_LD_HEAD} +# ${SYSTEM_LD} swapxxx.o +# ${SYSTEM_LD_TAIL} + +SYSTEM_OBJ= locore.o fp.o ${OBJS} param.o ioconf.o ${LIBKERN} \ + ${LIBCOMPAT} +# +SYSTEM_DEP= Makefile ${SYSTEM_OBJ} +SYSTEM_LD_HEAD= rm -f $@ +SYSTEM_LD= -@if [ X${DEBUG} = X-g ]; \ + then strip=-X; \ + else strip=-x; \ + fi; \ + echo ${LD} $$strip -o $@ -e start -T ../../conf/ld.script \ + '$${SYSTEM_OBJ}' vers.o; \ + ${LD} $$strip -o $@ -e start -T ../../conf/ld.script \ + ${SYSTEM_OBJ} vers.o +# +SYSTEM_LD_TAIL= chmod 755 $@; \ + elf2ecoff $@ $@.ecoff; \ + size $@ + +%LOAD + +newvers: + sh $S/conf/newvers.sh + ${CC} $(CFLAGS) -c vers.c + +clean:: + rm -f eddep bsd bsd.gdb bsd.ecoff tags *.o locore.i [a-z]*.s \ + Errs errs linterrs makelinks genassym + +lint: /tmp param.c + @lint -hbxn -DGENERIC -Dvolatile= ${COPTS} ${PARAM} -UKGDB \ + ${WGRISC}/wgrisc/Locore.c ${CFILES} \ + ioconf.c param.c + +symbols.sort: ${WGRISC}/wgrisc/symbols.raw + grep -v '^#' ${WGRISC}/wgrisc/symbols.raw \ + | sed 's/^ //' | sort -u > symbols.sort + +locore.o: ${WGRISC}/wgrisc/locore.S ${WGRISC}/include/asm.h \ + ${WGRISC}/include/cpu.h ${WGRISC}/include/reg.h assym.h + ${NORMAL_S} -mips1 ${WGRISC}/wgrisc/locore.S + +fp.o: ${WGRISC}/wgrisc/fp.S ${WGRISC}/include/asm.h \ + ${WGRISC}/include/cpu.h ${WGRISC}/include/reg.h assym.h + ${NORMAL_S} -mips1 ${WGRISC}/wgrisc/fp.S + +# the following are necessary because the files depend on the types of +# cpu's included in the system configuration +clock.o machdep.o autoconf.o conf.o: Makefile + +# depend on network configuration +uipc_domain.o uipc_proto.o vfs_conf.o: Makefile +if_tun.o if_loop.o if_ethersubr.o: Makefile +in_proto.o: Makefile + +assym.h: genassym + ./genassym >assym.h + +genassym: genassym.o + ${HOSTCC} -o $@ genassym.o + +genassym.o: ${WGRISC}/wgrisc/genassym.c + ${HOSTCC} ${INCLUDES} ${IDENT} -D_KERNEL -Dwgrisc -c $< + +links: + egrep '#if' ${CFILES} | sed -f $S/conf/defines | \ + sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink + echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \ + sort -u | comm -23 - dontlink | \ + sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks + sh makelinks && rm -f dontlink + +tags: + @echo "see $S/kern/Makefile for tags" + +ioconf.o: ioconf.c + ${NORMAL_C} + +param.c: $S/conf/param.c + rm -f param.c + cp $S/conf/param.c . + +param.o: param.c Makefile + ${NORMAL_C_C} + +newvers: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP} + sh $S/conf/newvers.sh + ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c vers.c + +depend:: .depend +.depend: ${SRCS} assym.h param.c + mkdep ${AFLAGS} ${CPPFLAGS} ${WGRISC}/wgrisc/locore.s + mkdep -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES} + mkdep -a ${AFLAGS} ${CPPFLAGS} ${SFILES} + mkdep -a ${CFLAGS} ${CPPFLAGS} ${PARAM} ${WGRISC}/wgrisc/genassym.c + +%RULES + diff --git a/sys/arch/wgrisc/conf/files.wgrisc b/sys/arch/wgrisc/conf/files.wgrisc new file mode 100644 index 00000000000..ad6fed82a90 --- /dev/null +++ b/sys/arch/wgrisc/conf/files.wgrisc @@ -0,0 +1,106 @@ +# $OpenBSD: files.wgrisc,v 1.1 1997/02/06 16:02:45 pefo Exp $ +# +# maxpartitions must be first item in files.${ARCH} +# +maxpartitions 8 + +maxusers 2 8 64 + +# Required files + + +file arch/wgrisc/wgrisc/autoconf.c +file arch/wgrisc/wgrisc/conf.c +file arch/wgrisc/wgrisc/cpu_exec.c +file arch/wgrisc/wgrisc/disksubr.c +file arch/wgrisc/wgrisc/machdep.c +file arch/wgrisc/wgrisc/minidebug.c +file arch/wgrisc/wgrisc/mem.c +file arch/wgrisc/wgrisc/pmap.c +file arch/wgrisc/wgrisc/process_machdep.c +file arch/wgrisc/wgrisc/sys_machdep.c +file arch/wgrisc/wgrisc/trap.c +file arch/wgrisc/wgrisc/vm_machdep.c + +# +# Machine-independent ATAPI drivers +# + +include "../../../dev/atapi/files.atapi" + + +# +# System BUS types +# + +define mainbus {} +device mainbus +attach mainbus at root +file arch/wgrisc/wgrisc/mainbus.c mainbus + +# Our CPU configurator +device cpu +attach cpu at mainbus # not optional +file arch/wgrisc/wgrisc/cpu.c cpu + +# +# LOCALBUS bus autoconfiguration devices +# +device riscbus {} +attach riscbus at mainbus # { slot = -1, offset = -1 } +file arch/wgrisc/riscbus/riscbus.c riscbus + +# Real time clock, must have one.. +device clock +attach clock at riscbus +file arch/wgrisc/wgrisc/clock.c clock +file arch/wgrisc/wgrisc/clock_dp.c clock + +# Ethernet chip +device sn +attach sn at riscbus: ifnet, ether +file arch/wgrisc/dev/if_sn.c sn needs-count + +# Use machine independent SCSI driver routines +include "../../../scsi/files.scsi" +major {sd = 0} +major {cd = 3} + +# Machine dependent SCSI interface driver +device asc: scsi +attach asc at riscbus +file arch/wgrisc/dev/asc.c asc needs-count + +# +# ISA +# +device isabr {} : isabus +attach isabr at mainbus +file arch/wgrisc/isa/isabus.c isabr + +# +# Stock isa bus support +# +define pcmcia {} # XXX dummy decl... + +include "../../../dev/isa/files.isa" + +# National Semiconductor DS8390/WD83C690-based boards +# (WD/SMC 80x3 family, SMC Ultra [8216], 3Com 3C503, NE[12]000, and clones) +# XXX conflicts with other ports; can't be in files.isa +device ed: ether, ifnet +attach ed at isa with ed_isa +attach ed at pcmcia with ed_pcmcia +file dev/isa/if_ed.c ed & (ed_isa | ed_pcmcia) needs-flag + +# 8250/16[45]50-based "com" ports +attach com at riscbus with com_risc +file arch/wgrisc/dev/com_risc.c com_risc + +# + +file dev/cons.c +file dev/cninit.c +file netinet/in_cksum.c +file netns/ns_cksum.c ns + diff --git a/sys/arch/wgrisc/conf/ld.script b/sys/arch/wgrisc/conf/ld.script new file mode 100644 index 00000000000..3c59f13f80b --- /dev/null +++ b/sys/arch/wgrisc/conf/ld.script @@ -0,0 +1,74 @@ +OUTPUT_FORMAT("elf32-littlemips", "elf32-bigmips", + "elf32-littlemips") +OUTPUT_ARCH(mips) +ENTRY(_start) +SECTIONS +{ + /* Read-only sections, merged into text segment: */ + . = 0x80100000 + SIZEOF_HEADERS; + .text : + { + _ftext = . ; + *(.text) + *(.rodata) + *(.rodata1) + *(.reginfo) + *(.init) + *(.stub) + /* .gnu.warning sections are handled specially by elf32.em. */ + *(.gnu.warning) + } =0 + _etext = .; + PROVIDE (etext = .); + .fini : { *(.fini) } =0 + .data : + { + _fdata = . ; + *(.data) + CONSTRUCTORS + } + .data1 : { *(.data1) } + .ctors : { *(.ctors) } + .dtors : { *(.dtors) } + _gp = ALIGN(16) + 0x7ff0; + .got : + { + *(.got.plt) *(.got) + } + /* We want the small data sections together, so single-instruction offsets + can access them all, and initialized data all before uninitialized, so + we can shorten the on-disk segment size. */ + .sdata : { *(.sdata) } + .lit8 : { *(.lit8) } + .lit4 : { *(.lit4) } + _edata = .; + PROVIDE (edata = .); + __bss_start = .; + _fbss = .; + .sbss : { *(.sbss) *(.scommon) } + .bss : + { + *(.dynbss) + *(.bss) + *(COMMON) + } + _end = . ; + PROVIDE (end = .); + /* These are needed for ELF backends which have not yet been + converted to the new style linker. */ + .stab 0 : { *(.stab) } + .stabstr 0 : { *(.stabstr) } + /* DWARF debug sections. + Symbols in the .debug DWARF section are relative to the beginning of the + section so we begin .debug at 0. It's not clear yet what needs to happen + for the others. */ + .debug 0 : { *(.debug) } + .debug_srcinfo 0 : { *(.debug_srcinfo) } + .debug_aranges 0 : { *(.debug_aranges) } + .debug_pubnames 0 : { *(.debug_pubnames) } + .debug_sfnames 0 : { *(.debug_sfnames) } + .line 0 : { *(.line) } + /* These must appear regardless of . */ + .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) } + .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) } +} |