Permalink
Browse files

mvme68k port -- for the motorola vme147 m68030 card

  • Loading branch information...
1 parent a2bca40 commit bd04e0b515f202e8f8be165d29c40e3a577a199a chuck committed Jul 25, 1995
Showing with 18,713 additions and 0 deletions.
  1. +5 −0 sys/arch/mvme68k/Makefile
  2. +152 −0 sys/arch/mvme68k/README
  3. +1 −0 sys/arch/mvme68k/compile/.keep_me
  4. +164 −0 sys/arch/mvme68k/conf/Makefile.mvme68k
  5. +51 −0 sys/arch/mvme68k/conf/VME147
  6. +49 −0 sys/arch/mvme68k/conf/files.mvme68k
  7. +965 −0 sys/arch/mvme68k/dev/if_le.c
  8. +167 −0 sys/arch/mvme68k/dev/if_lereg.h
  9. +114 −0 sys/arch/mvme68k/dev/iio.c
  10. +18 −0 sys/arch/mvme68k/dev/iio.h
  11. +171 −0 sys/arch/mvme68k/dev/pcc.c
  12. +130 −0 sys/arch/mvme68k/dev/pccreg.h
  13. +64 −0 sys/arch/mvme68k/dev/scc.h
  14. +996 −0 sys/arch/mvme68k/dev/zs.c
  15. +4 −0 sys/arch/mvme68k/include/ansi.h
  16. +48 −0 sys/arch/mvme68k/include/aout_machdep.h
  17. +3 −0 sys/arch/mvme68k/include/asm.h
  18. +8 −0 sys/arch/mvme68k/include/cdefs.h
  19. +230 −0 sys/arch/mvme68k/include/cpu.h
  20. +4 −0 sys/arch/mvme68k/include/db_machdep.h
  21. +46 −0 sys/arch/mvme68k/include/disklabel.h
  22. +4 −0 sys/arch/mvme68k/include/endian.h
  23. +48 −0 sys/arch/mvme68k/include/exec.h
  24. +8 −0 sys/arch/mvme68k/include/float.h
  25. +3 −0 sys/arch/mvme68k/include/frame.h
  26. +4 −0 sys/arch/mvme68k/include/limits.h
  27. +183 −0 sys/arch/mvme68k/include/param.h
  28. +67 −0 sys/arch/mvme68k/include/pcb.h
  29. +159 −0 sys/arch/mvme68k/include/pmap.h
  30. +53 −0 sys/arch/mvme68k/include/proc.h
  31. +3 −0 sys/arch/mvme68k/include/profile.h
  32. +3 −0 sys/arch/mvme68k/include/psl.h
  33. +152 −0 sys/arch/mvme68k/include/pte.h
  34. +4 −0 sys/arch/mvme68k/include/ptrace.h
  35. +8 −0 sys/arch/mvme68k/include/reg.h
  36. +3 −0 sys/arch/mvme68k/include/setjmp.h
  37. +4 −0 sys/arch/mvme68k/include/signal.h
  38. +4 −0 sys/arch/mvme68k/include/stdarg.h
  39. +3 −0 sys/arch/mvme68k/include/trap.h
  40. +10 −0 sys/arch/mvme68k/include/types.h
  41. +4 −0 sys/arch/mvme68k/include/varargs.h
  42. +246 −0 sys/arch/mvme68k/include/vmparam.h
  43. +251 −0 sys/arch/mvme68k/mvme68k/autoconf.c
  44. +367 −0 sys/arch/mvme68k/mvme68k/clock.c
  45. +76 −0 sys/arch/mvme68k/mvme68k/clockreg.h
  46. +278 −0 sys/arch/mvme68k/mvme68k/conf.c
  47. +198 −0 sys/arch/mvme68k/mvme68k/disksubr.c
  48. +66 −0 sys/arch/mvme68k/mvme68k/dkbad.c
  49. +208 −0 sys/arch/mvme68k/mvme68k/genassym.c
  50. +47 −0 sys/arch/mvme68k/mvme68k/isr.h
  51. +1,896 −0 sys/arch/mvme68k/mvme68k/locore.s
  52. +1,469 −0 sys/arch/mvme68k/mvme68k/machdep.c
  53. +29 −0 sys/arch/mvme68k/mvme68k/mainbus.c
  54. +222 −0 sys/arch/mvme68k/mvme68k/mem.c
  55. +2,659 −0 sys/arch/mvme68k/mvme68k/pmap.c
  56. +505 −0 sys/arch/mvme68k/mvme68k/pmap_bootstrap.c
  57. +170 −0 sys/arch/mvme68k/mvme68k/swapgeneric.c
  58. +263 −0 sys/arch/mvme68k/mvme68k/sys_machdep.c
  59. +1,084 −0 sys/arch/mvme68k/mvme68k/trap.c
  60. +160 −0 sys/arch/mvme68k/mvme68k/vectors.s
  61. +412 −0 sys/arch/mvme68k/mvme68k/vm_machdep.c
  62. +5 −0 sys/arch/mvme68k/stand/Makefile
  63. +37 −0 sys/arch/mvme68k/stand/Makefile.inc
  64. +41 −0 sys/arch/mvme68k/stand/libsa/Makefile
  65. +86 −0 sys/arch/mvme68k/stand/libsa/SRT0.S
  66. +68 −0 sys/arch/mvme68k/stand/libsa/SRT1.c
  67. +128 −0 sys/arch/mvme68k/stand/libsa/clock.c
  68. +6 −0 sys/arch/mvme68k/stand/libsa/clock.h
  69. +71 −0 sys/arch/mvme68k/stand/libsa/clockreg.h
  70. +10 −0 sys/arch/mvme68k/stand/libsa/config.h
  71. +24 −0 sys/arch/mvme68k/stand/libsa/devopen.c
  72. +176 −0 sys/arch/mvme68k/stand/libsa/exec.c
  73. +117 −0 sys/arch/mvme68k/stand/libsa/gets.c
  74. +176 −0 sys/arch/mvme68k/stand/libsa/if_lereg.h
  75. +154 −0 sys/arch/mvme68k/stand/libsa/machdep.c
  76. +530 −0 sys/arch/mvme68k/stand/libsa/netif.c
  77. +22 −0 sys/arch/mvme68k/stand/libsa/netif.h
  78. +31 −0 sys/arch/mvme68k/stand/libsa/panic.c
  79. +15 −0 sys/arch/mvme68k/stand/netboot/Makefile
  80. +77 −0 sys/arch/mvme68k/stand/netboot/boot.c
  81. +21 −0 sys/arch/mvme68k/stand/netboot/conf.c
  82. +175 −0 sys/arch/mvme68k/stand/netboot/dev_net.c
  83. +6 −0 sys/arch/mvme68k/stand/netboot/dev_net.h
  84. +9 −0 sys/arch/mvme68k/stand/netboot/version.c
  85. +19 −0 sys/arch/mvme68k/stand/sboot/Makefile
  86. +117 −0 sys/arch/mvme68k/stand/sboot/clock.c
  87. +69 −0 sys/arch/mvme68k/stand/sboot/clockreg.h
  88. +139 −0 sys/arch/mvme68k/stand/sboot/console.c
  89. +213 −0 sys/arch/mvme68k/stand/sboot/etherfun.c
  90. +124 −0 sys/arch/mvme68k/stand/sboot/etherfun.h
  91. +176 −0 sys/arch/mvme68k/stand/sboot/if_lereg.h
  92. +320 −0 sys/arch/mvme68k/stand/sboot/le_poll.c
  93. +348 −0 sys/arch/mvme68k/stand/sboot/libc_sa.c
  94. +187 −0 sys/arch/mvme68k/stand/sboot/oc_cksum.s
  95. +150 −0 sys/arch/mvme68k/stand/sboot/sboot.c
  96. +96 −0 sys/arch/mvme68k/stand/sboot/sboot.h
  97. +47 −0 sys/arch/mvme68k/stand/sboot/start.s
@@ -0,0 +1,5 @@
+# $NetBSD: Makefile,v 1.1.1.1 1995/07/25 23:11:53 chuck Exp $
+
+SUBDIR= stand
+
+.include <bsd.subdir.mk>
View
@@ -0,0 +1,152 @@
+ $NetBSD: README,v 1.1.1.1 1995/07/25 23:11:53 chuck Exp $
+
+NetBSD/mvme68k port
+
+supported environment:
+
+ Motorola makes a number of m68k VME cards. This port
+currently only works on the m68030 based VME147 card (diskless only
+for now).
+
+requirements:
+ - VME147 card
+ - a machine to connect the console to
+ - network connection
+ - NFS server (to serve root and swap)
+
+future plans:
+ - VME147 scsi disk support
+ - hopefully, support for the VME162 card
+
+
+how to boot:
+ Booting NetBSD/mvme68k on a VME147 is somewhat painful because
+the ROM doesn't know how to talk to the ethernet chip. I have solved
+this problem by downloading a bootstrap into RAM via the console line.
+
+ First, you will need a m68k8k NFS mountable /usr and root
+directory. NetBSD/sun3 binaries will run fine on the mvme68k system
+for the most part (the exception being kvm stuff). These binaries can
+be ftp'd from ftp.netbsd.org. You will also need a NetBSD/mvme68k
+kernel and related bootstraps. For now these can be obtained from
+dworkin.wustl.edu in /dist/netbsd/mvme68k_boot.tar.gz (once I get set
+up I will put these plus a snapshot on ftp.netbsd.org).
+
+ Put the mvme68k "netbsd" binary in NFS root directory. Put
+boot.vme147 in /tftpboot of your NFS server machine. Make a symbolic
+link from the hex encoding of your IP address to that file. For
+example:
+
+lrwxrwxrwx 1 root 11 Apr 13 17:27 80FCA93F.147 -> boot.vme147
+
+
+[80FCA93F is the IP address (128.252.169.63) of my vme147.]
+
+Make sure you've got the right info in /etc/ethers and /etc/bootparams
+on your server.
+
+
+Now, bring up your 147. You should have the "bug" prompt:
+
+COLD Start
+
+Onboard RAM start = $00000000, stop = $007FFFFF
+
+147-Bug>
+
+
+Make sure the "stop" looks ok (if you've got 8MB you should have the
+same value as I). Also make sure the clock is ticking:
+
+147-Bug>time
+Sunday 5/30/27 16:25:14
+147-Bug>time
+Sunday 5/30/27 16:25:15
+147-Bug>
+
+
+Looks good. you now need to download "sboot" into RAM. you can
+either do that through the console line or through a 2nd serial
+connection. I have my 147 connected to a sun4/110 and I access it via
+"tip". to load that way do this:
+
+lo 0
+~Ccat sboot
+go 4000
+
+which will look like this:
+147-Bug>
+147-Bug>lo 0
+~CLocal command? cat sboot
+
+away for 11 seconds
+!
+
+147-Bug>g 4000
+Effective address: 00004000
+
+sboot: serial line bootstrap program (&end = 5fd8)
+
+>>>
+
+
+Now, if you want to do it through serial line 1, then connect serial
+line one to a machine. At the "147-Bug> " prompt do this "tm
+1"... you should then login to what ever machine it is connected to.
+Then hit "^A" to escape to Bug. do "lo 1;x=cat sboot" ... then when
+that is done you can reconnect "tm 1" and logout. Then do "go 4000"
+and you've got ">>> " prompt of sboot.
+
+
+Once you've got the ">>> " prompt you can do commands such as:
+"b" - boot "netbsd" multiuser
+"b gennetbsd" - boot "gennetbsd" multiuser
+"b -s" - boot "netbsd" single user
+"b gennetbsd -s"- boot "gennetbsd" single user
+
+A typical boot looks like this:
+
+>>> b
+le0: ethernet address: 8:0:3e:20:cb:87
+My ip address is: 128.252.169.63
+Server ip address is: 128.252.169.2
+3800
+Download was a success!
+Start @ 0x8000 ...
+>> NetBSD netboot [$Revision: 1.1.1.1 $]
+boot: client IP address: 128.252.169.63
+boot: client name: vme147
+root addr=128.252.169.2 path=/export/root/vme147
+449744+20348+64444+[29268+29051]=0x90f0b
+Start @ 0x88aa ...
+Copyright (c) 1982, 1986, 1989, 1991, 1993
+ The Regents of the University of California. All rights reserved.
+
+NetBSD 1.0A (VME147) #17: Sat Jul 1 00:07:04 CDT 1995
+ chuck@vme147.ccrc.wustl.edu:/um/netbsd/src/sys/arch/mvme68k/compile/VME147
+Motorola MVME147 MC68030 CPU+MMU, ???MHz MC68882 FPU)
+real mem = 8388608
+avail mem = 6832128
+using 102 buffers containing 417792 bytes of memory
+mainbus0 (root)
+iio0 at mainbus0 addr 0xfffe0000
+pcc0 at iio0 offset 0x1000 rev 0 intbvr 0x40
+clock0 at iio0 offset 0x7f8 ipl 5
+zs0 at iio0 offset 0x3000 ipl 4
+le0 at iio0 offset 0x1800 ipl 2 ler2 0x94000 address 08:00:3e:20:cb:87
+nfs_boot: using network interface 'le0'
+nfs_boot: client_addr=0x80fca93f
+nfs_boot: server_addr=0x80fca902
+nfs_boot: hostname=vme147
+root on dworkin:/export/root/vme147
+root time: 0x2ffc6859
+WARNING: clock gained 18 days -- CHECK AND RESET THE DATE!
+swap on dworkin:/export/swap/vme147
+swap size: 0x4000 (blocks)
+init: copying out path `/sbin/init' 11
+Automatic boot in progress: starting file system checks.
+[etc...]
+
+
+good luck!
+
@@ -0,0 +1 @@
+This normally empty directory needs to be kept in the distribution.
@@ -0,0 +1,164 @@
+# $NetBSD: Makefile.mvme68k,v 1.1.1.1 1995/07/25 23:12:05 chuck Exp $
+
+# @(#)Makefile.hp300 8.2 (Berkeley) 1/23/94
+#
+# Makefile for NetBSD
+#
+# This makefile is constructed from a machine description:
+# config machineid
+# Most changes should be made in the machine description
+# /sys/arch/mvme68k/conf/``machineid''
+# after which you should do
+# config.new machineid
+# Machine generic makefile changes should be made in
+# /sys/arch/mvme68k/conf/Makefile.mvme68k
+# 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 ${DEBUG}
+CC= cc ${DEBUG}
+CPP= cpp
+LD= ld
+TOUCH= touch -f -c
+AWK= awk
+
+# source tree is located via $S relative to the compilation directory
+S= ../../../..
+MVME68K= ../..
+
+INCLUDES= -I. -I$S/arch -I$S -I$S/sys
+COPTS= ${INCLUDES} ${IDENT} -D_KERNEL -Dmc68020 -Dmvme68k -DFPCOPROC
+CFLAGS= -O ${COPTS}
+
+### 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
+
+### for the Motorola 68040 Floating Point Software Product
+.include "$S/arch/m68k/fpsp/Makefile.inc"
+
+# 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.
+
+NORMAL_C= ${CC} -c ${CFLAGS} ${PROF} $<
+NORMAL_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $<
+
+DRIVER_C= ${CC} -c ${CFLAGS} ${PROF} $<
+DRIVER_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $<
+
+PROFILE_C= ${CC} -S -c ${COPTS} $<; \
+ sed -e s/_mcount/mcount/ -e s/subrmcount/subr_mcount/ <$*.s | \
+ ${AS} -o $@; \
+ rm -f $*.s
+
+NORMAL_S= ${CPP} ${COPTS} $< | ${AS} -o $@
+NORMAL_S_C= ${CPP} ${COPTS} ${PARAM} $< | ${AS} -o $@
+
+%OBJS
+
+%CFILES
+
+# load lines for config "xxx" will be emitted as:
+# xxx: ${SYSTEM_DEP} swapxxx.o
+# ${SYSTEM_LD_HEAD}
+# ${SYSTEM_LD} swapxxx.o
+# ${SYSTEM_LD_TAIL}
+DEBUG?=
+.if ${DEBUG} == "-g"
+LDX=-X
+.else
+LDX=-x
+.endif
+SYSTEM_OBJ= locore.o ${FPSP} vnode_if.o ${OBJS} param.o ioconf.o \
+ ${LIBKERN} ${LIBCOMPAT}
+SYSTEM_DEP= Makefile ${SYSTEM_OBJ}
+SYSTEM_LD_HEAD= @echo loading $@; rm -f $@
+SYSTEM_LD= @${LD} ${LDX} -Ttext 0x8000 -n -o $@ -e start \
+ ${SYSTEM_OBJ} vers.o
+SYSTEM_LD_TAIL= @echo rearranging symbols; size $@; chmod 755 $@
+
+%LOAD
+
+newvers: vers.o
+
+vers.o: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
+ sh $S/conf/newvers.sh
+ ${CC} ${CFLAGS} -c vers.c
+
+clean::
+ rm -f eddep *netbsd netbsd.gdb tags vnode_if.[ch] *.o locore.i \
+ [a-z]*.s [Ee]rrs linterrs makelinks genassym
+
+lint: /tmp param.c
+ @lint -hbxn -DGENERIC -Dvolatile= ${COPTS} ${PARAM} -UKGDB \
+ ${MVME68K}/mvme68k/Locore.c ${CFILES} ${MVME68K}/mvme68k/swapgeneric.c \
+ ioconf.c param.c | \
+ grep -v 'struct/union .* never defined' | \
+ grep -v 'possible pointer alignment problem'
+
+locore.o: assym.s ${MVME68K}/mvme68k/vectors.s ${MVME68K}/mvme68k/locore.s
+locore.o: ${MVME68K}/include/trap.h ${MVME68K}/include/psl.h ${MVME68K}/include/pte.h
+locore.o: ${MVME68K}/include/cpu.h
+ ${CPP} -DLOCORE ${COPTS} ${MVME68K}/mvme68k/locore.s | ${AS} -o locore.o
+
+# depend on maxusers
+assym.s: Makefile
+
+assym.s: genassym
+ ./genassym > assym.s
+
+genassym: ${MVME68K}/mvme68k/genassym.c Makefile
+ cc ${INCLUDES} ${IDENT} ${PARAM} -Dmc68020 -Dmvme68k -o genassym \
+ ${MVME68K}/mvme68k/genassym.c
+
+depend: assym.s param.c vnode_if.h
+ mkdep ${COPTS} ${CFILES} ioconf.c param.c
+ mkdep -a -p ${INCLUDES} ${IDENT} ${PARAM} ${MVME68K}/mvme68k/genassym.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
+ ${CC} -c ${CFLAGS} ioconf.c
+
+param.c: $S/conf/param.c
+ rm -f param.c
+ cp $S/conf/param.c .
+
+param.o: param.c Makefile
+ ${CC} -c ${CFLAGS} ${PARAM} param.c
+
+vnode_if.c vnode_if.h: $S/kern/vnode_if.sh $S/kern/vnode_if.src
+ AWK="${AWK}" sh $S/kern/vnode_if.sh $S/kern/vnode_if.src
+
+%RULES
@@ -0,0 +1,51 @@
+# $NetBSD: VME147,v 1.1.1.1 1995/07/25 23:12:05 chuck Exp $
+
+machine mvme68k m68k
+
+options "M68040" # support for 040
+options FPSP # MC68040 floating point support
+options "M68030" # support for 030
+options FPCOPROC # Support for MC6888[12] (Required)
+
+maxusers 2
+
+# obsolete timezone spec
+options TIMEZONE=0, DST=0
+
+options DIAGNOSTIC, DEBUG
+#options FFS
+options NFSCLIENT
+#options NFSSERVER
+#options SYSVSHM
+options KTRACE
+options COMPAT_43
+options FIFO
+#options MFS
+options DEVPAGER, SWAPPAGER, VNODEPAGER
+#options MSDOSFS
+
+# Networking options
+options INET
+options TCP_COMPAT_42 # compatibility with 4.2BSD TCP/IP
+#options GATEWAY # IP packet forwarding
+#options ISO # OSI networking
+#options TPIP
+#options EON
+options COMPAT_09, COMPAT_10
+options COMPAT_SUNOS
+
+config netbsd root on nfs swap on nfs
+
+pseudo-device sl
+pseudo-device ppp 2
+pseudo-device loop
+pseudo-device bpfilter
+pseudo-device pty
+
+mainbus0 at root
+iio0 at mainbus0
+
+pcc0 at iio0 offset 0x1000
+zs0 at iio0 offset 0x3000 ipl 4
+clock0 at iio0 offset 0x07f8 ipl 5
+le0 at iio0 offset 0x1800 ipl 2
Oops, something went wrong.

0 comments on commit bd04e0b

Please sign in to comment.