summaryrefslogtreecommitdiff
path: root/sys/arch/powerpc/conf
diff options
context:
space:
mode:
authorDale S. Rahn <rahnds@cvs.openbsd.org>1996-12-21 20:36:01 +0000
committerDale S. Rahn <rahnds@cvs.openbsd.org>1996-12-21 20:36:01 +0000
commitdc30ff96e6245ece5f67a29e2fd10a1709ad6180 (patch)
tree751db7b8d3d040efc30fd7960d015150e466ddc1 /sys/arch/powerpc/conf
parentae21b4f61e88746c5a90663332ee3ba0e1f2997a (diff)
Check-in of powerpc kernel support.
NOTE: This will not work until the other pieces are checked in. This is primarily the NetBSD powerpc port, with modifications to support ELF.
Diffstat (limited to 'sys/arch/powerpc/conf')
-rw-r--r--sys/arch/powerpc/conf/GENERIC63
-rw-r--r--sys/arch/powerpc/conf/Makefile.powerpc186
-rw-r--r--sys/arch/powerpc/conf/NFS69
-rw-r--r--sys/arch/powerpc/conf/TST67
-rw-r--r--sys/arch/powerpc/conf/TST.net67
-rw-r--r--sys/arch/powerpc/conf/TST169
-rw-r--r--sys/arch/powerpc/conf/TSTdbg69
-rw-r--r--sys/arch/powerpc/conf/files.powerpc59
8 files changed, 649 insertions, 0 deletions
diff --git a/sys/arch/powerpc/conf/GENERIC b/sys/arch/powerpc/conf/GENERIC
new file mode 100644
index 00000000000..7a8afb7a31d
--- /dev/null
+++ b/sys/arch/powerpc/conf/GENERIC
@@ -0,0 +1,63 @@
+#
+# First try for PPC GENERIC config file
+#
+
+machine powerpc
+
+maxusers 32
+
+# Standard system options (should go into std.powerpc?)
+options SWAPPAGER, VNODEPAGER, DEVPAGER
+options MACHINE_NONCONTIG
+options EXEC_AOUT
+options EXEC_SCRIPT
+
+# various hacks due to bugs in Openfirmware implementation
+options FIREPOWERBUGS
+
+options IPKDBUSERHACK
+makeoptions DEBUG="-g"
+
+options TCP_COMPAT_42
+options COMPAT_43
+options COMPAT_09
+options COMPAT_10
+options COMPAT_12
+
+options FFS
+options MFS
+
+options NFSCLIENT
+options NFSSERVER
+
+options CD9660
+options MSDOSFS
+options FDESC
+options FIFO
+options KERNFS
+options NULLFS
+options PORTAL
+options PROCFS
+options UMAPFS
+options UNION
+
+options INET
+options NMBCLUSTERS=1024
+
+config netbsd swap generic
+
+ofroot* at root
+
+ofbus* at openfirm?
+
+ofdisk* at openfirm?
+
+ofnet* at openfirm?
+ipkdbif0 at ofnet?
+
+ofcons* at openfirm?
+
+ofrtc* at openfirm?
+
+pseudo-device loop
+pseudo-device pty 64
diff --git a/sys/arch/powerpc/conf/Makefile.powerpc b/sys/arch/powerpc/conf/Makefile.powerpc
new file mode 100644
index 00000000000..aa1bfd47bee
--- /dev/null
+++ b/sys/arch/powerpc/conf/Makefile.powerpc
@@ -0,0 +1,186 @@
+# $NetBSD: Makefile.powerpc,v 1.1 1996/09/30 16:34:18 ws Exp $
+#
+# Makefile for NetBSD
+#
+# This makefile is constructed from a machine description:
+# config machineid
+# Most changes should be made in the machine description
+# /sys/arch/powerpc/conf/``machineid''
+# after which you should do
+# config machineid
+# Machine generic makefile changes should be made in
+# /sys/arch/powerpc/conf/Makefile.powerpc
+# 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
+#
+.SUFFIXES: .S .c .o
+
+# DEBUG is set to -g if debugging.
+# PROF is set to -pg if profiling.
+
+CC?= cc
+LD?= ld
+MKDEP?= mkdep
+STRIP?= strip
+SIZE?= size
+
+# source tree is located via $S relative to the compilation directory
+#.ifndef S
+#S!= cd ../../../..; pwd
+#.endif
+S= ../../../..
+PPC= $S/arch/powerpc
+
+INCLUDES= -I. -I$S/arch -I$S -nostdinc -L${DESTDIR}/usr/include
+CPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL \
+ -Dpowerpc
+CWARNFLAGS= -Werror -Wreturn-type
+CFLAGS= ${DEBUG} ${CWARNFLAGS} -O2 -msoft-float
+AFLAGS= -D_LOCORE
+LINKFLAGS= -N -Ttext 100000 -e start
+STRIPFLAGS= -d
+
+HOSTCC?= ${CC}
+HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
+HOSTED_CFLAGS= ${CFLAGS}
+
+### 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} where TYPE is NORMAL or
+# HOSTED}, and SUFFIX is the file suffix, capitalized (e.g. C for a .c file).
+
+NORMAL_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
+
+NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
+
+HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
+
+#.c.o:
+# ${NORMAL_C}
+#
+#.S.o:
+# ${NORMAL_S}
+
+%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 \
+ param.o ioconf.o ${OBJS} ${LIBKERN} ${LIBCOMPAT}
+SYSTEM_DEP= Makefile ${SYSTEM_OBJ}
+SYSTEM_LD_HEAD= rm -f $@
+SYSTEM_LD= @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_OBJ}' vers.o; \
+ ${LD} ${LINKFLAGS} -o $@ ${SYSTEM_OBJ} vers.o
+SYSTEM_LD_TAIL= @${SIZE} $@; chmod 755 $@
+
+DEBUG?=
+.if ${DEBUG} == "-g"
+LINKFLAGS+= -X
+SYSTEM_LD_TAIL+=; \
+ echo cp $@ $@.gdb; rm -f $@.gdb; cp $@ $@.gdb; \
+ echo ${STRIP} ${STRIPFLAGS} $@; ${STRIP} ${STRIPFLAGS} $@
+.else
+LINKFLAGS+= -S
+.endif
+
+%LOAD
+
+assym.h: genassym
+ ./genassym > assym.h
+
+genassym: genassym.o
+ ${HOSTCC} -o $@ genassym.o
+
+genassym.o: ${PPC}/powerpc/genassym.c
+ ${HOSTED_C}
+
+param.c: $S/conf/param.c
+ rm -f param.c
+ cp $S/conf/param.c .
+
+param.o: param.c Makefile
+ ${NORMAL_C}
+
+ioconf.o: ioconf.c
+ ${NORMAL_C}
+
+newvers: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
+ sh $S/conf/newvers.sh
+ ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c vers.c
+
+clean::
+ rm -f eddep *netbsd netbsd.gdb tags *.[io] [a-z]*.s \
+ [Ee]rrs linterrs makelinks genassym genassym.o assym.h
+
+lint:
+ @lint -hbxncez -DGENERIC -Dvolatile= ${CPPFLAGS} -UKGDB \
+ ${PPC}/powerpc/Locore.c ${CFILES} ${PPC}/powerpc/swapgeneric.c \
+ ioconf.c param.c | \
+ grep -v 'static function .* unused'
+
+tags:
+ @echo "see $S/kern/Makefile for tags"
+
+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
+
+SRCS= ${PPC}/powerpc/locore.S \
+ param.c ioconf.c ${CFILES} ${SFILES}
+depend:: .depend
+.depend: ${SRCS} assym.h param.c
+ ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${PPC}/powerpc/locore.S
+ ${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
+.if ${SFILES} != ""
+ ${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
+.endif
+ ${MKDEP} -a ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} \
+ ${PPC}/powerpc/genassym.c
+
+# depend on root or device configuration
+autoconf.o conf.o: Makefile
+
+# depend on network or filesystem configuration
+uipc_proto.o vfs_conf.o: Makefile
+
+# depend on maxusers
+genassym.o machdep.o: Makefile
+
+# depend on CPU configuration
+locore.o machdep.o: Makefile
+
+
+locore.o: ${PPC}/powerpc/locore.S assym.h
+ ${NORMAL_S}
+
+%RULES
diff --git a/sys/arch/powerpc/conf/NFS b/sys/arch/powerpc/conf/NFS
new file mode 100644
index 00000000000..412dd991331
--- /dev/null
+++ b/sys/arch/powerpc/conf/NFS
@@ -0,0 +1,69 @@
+#
+# First try for PPC GENERIC config file
+#
+
+machine powerpc
+
+maxusers 32
+
+# Standard system options (should go into std.powerpc?)
+options SWAPPAGER, VNODEPAGER, DEVPAGER
+options MACHINE_NONCONTIG
+options EXEC_ELF
+options EXEC_SCRIPT
+
+# various hacks due to bugs in Openfirmware implementation
+options FIREPOWERBUGS
+
+#options IPKDBUSERHACK
+#makeoptions DEBUG="-g"
+
+options KTRACE
+options SYSCALL_DEBUG
+options TCP_COMPAT_42
+options COMPAT_43
+options COMPAT_09
+options COMPAT_10
+options COMPAT_12
+
+options FFS
+options MFS
+
+options NFSCLIENT
+#options NFSSERVER
+
+options CD9660
+options MSDOSFS
+options FDESC
+options FIFO
+options KERNFS
+options NULLFS
+options PORTAL
+options PROCFS
+options UMAPFS
+options UNION
+
+options INET
+options NMBCLUSTERS=1024
+
+options MAXUSERS=20
+options TARGET_ELF
+
+config netbsd swap generic
+
+ofroot* at root
+
+ofbus* at openfirm?
+
+ofdisk* at openfirm?
+
+ofnet* at openfirm?
+#ipkdbif0 at ofnet?
+
+ofcons* at openfirm?
+
+ofrtc* at openfirm?
+
+pseudo-device loop
+pseudo-device pty 64
+pseudo-device random 1
diff --git a/sys/arch/powerpc/conf/TST b/sys/arch/powerpc/conf/TST
new file mode 100644
index 00000000000..b8266623cd4
--- /dev/null
+++ b/sys/arch/powerpc/conf/TST
@@ -0,0 +1,67 @@
+#
+# First try for PPC GENERIC config file
+#
+
+machine powerpc
+
+maxusers 32
+
+# Standard system options (should go into std.powerpc?)
+options SWAPPAGER, VNODEPAGER, DEVPAGER
+options MACHINE_NONCONTIG
+options EXEC_ELF
+options EXEC_SCRIPT
+
+# various hacks due to bugs in Openfirmware implementation
+options FIREPOWERBUGS
+
+#options IPKDBUSERHACK
+#makeoptions DEBUG="-g"
+
+options TCP_COMPAT_42
+options COMPAT_43
+options COMPAT_09
+options COMPAT_10
+options COMPAT_12
+
+options FFS
+options MFS
+
+#options NFSCLIENT
+#options NFSSERVER
+
+options CD9660
+options MSDOSFS
+options FDESC
+options FIFO
+options KERNFS
+options NULLFS
+options PORTAL
+options PROCFS
+options UMAPFS
+options UNION
+
+options INET
+options NMBCLUSTERS=1024
+
+options MAXUSERS=20
+options TARGET_ELF
+
+config netbsd swap generic
+
+ofroot* at root
+
+ofbus* at openfirm?
+
+ofdisk* at openfirm?
+
+#ofnet* at openfirm?
+#ipkdbif0 at ofnet?
+
+ofcons* at openfirm?
+
+ofrtc* at openfirm?
+
+pseudo-device loop
+pseudo-device pty 64
+pseudo-device random 1
diff --git a/sys/arch/powerpc/conf/TST.net b/sys/arch/powerpc/conf/TST.net
new file mode 100644
index 00000000000..31b09a7f273
--- /dev/null
+++ b/sys/arch/powerpc/conf/TST.net
@@ -0,0 +1,67 @@
+#
+# First try for PPC GENERIC config file
+#
+
+machine powerpc
+
+maxusers 32
+
+# Standard system options (should go into std.powerpc?)
+options SWAPPAGER, VNODEPAGER, DEVPAGER
+options MACHINE_NONCONTIG
+options EXEC_ELF
+options EXEC_SCRIPT
+
+# various hacks due to bugs in Openfirmware implementation
+options FIREPOWERBUGS
+
+#options IPKDBUSERHACK
+#makeoptions DEBUG="-g"
+
+options TCP_COMPAT_42
+options COMPAT_43
+options COMPAT_09
+options COMPAT_10
+options COMPAT_12
+
+options FFS
+options MFS
+
+#options NFSCLIENT
+#options NFSSERVER
+
+options CD9660
+options MSDOSFS
+options FDESC
+options FIFO
+options KERNFS
+options NULLFS
+options PORTAL
+options PROCFS
+options UMAPFS
+options UNION
+
+options INET
+options NMBCLUSTERS=1024
+
+options MAXUSERS=20
+options TARGET_ELF
+
+config netbsd swap generic
+
+ofroot* at root
+
+ofbus* at openfirm?
+
+ofdisk* at openfirm?
+
+ofnet* at openfirm?
+#ipkdbif0 at ofnet?
+
+ofcons* at openfirm?
+
+ofrtc* at openfirm?
+
+pseudo-device loop
+pseudo-device pty 64
+pseudo-device random 1
diff --git a/sys/arch/powerpc/conf/TST1 b/sys/arch/powerpc/conf/TST1
new file mode 100644
index 00000000000..91538d31ef2
--- /dev/null
+++ b/sys/arch/powerpc/conf/TST1
@@ -0,0 +1,69 @@
+#
+# First try for PPC GENERIC config file
+#
+
+machine powerpc
+
+maxusers 32
+
+# Standard system options (should go into std.powerpc?)
+options SWAPPAGER, VNODEPAGER, DEVPAGER
+options MACHINE_NONCONTIG
+options EXEC_ELF
+options EXEC_SCRIPT
+
+# various hacks due to bugs in Openfirmware implementation
+options FIREPOWERBUGS
+
+#options IPKDBUSERHACK
+#makeoptions DEBUG="-g"
+
+options KTRACE
+options SYSCALL_DEBUG
+options TCP_COMPAT_42
+options COMPAT_43
+options COMPAT_09
+options COMPAT_10
+options COMPAT_12
+
+options FFS
+options MFS
+
+#options NFSCLIENT
+#options NFSSERVER
+
+options CD9660
+options MSDOSFS
+options FDESC
+options FIFO
+options KERNFS
+options NULLFS
+options PORTAL
+options PROCFS
+options UMAPFS
+options UNION
+
+options INET
+options NMBCLUSTERS=1024
+
+options MAXUSERS=20
+options TARGET_ELF
+
+config netbsd swap generic
+
+ofroot* at root
+
+ofbus* at openfirm?
+
+ofdisk* at openfirm?
+
+ofnet* at openfirm?
+#ipkdbif0 at ofnet?
+
+ofcons* at openfirm?
+
+ofrtc* at openfirm?
+
+pseudo-device loop
+pseudo-device pty 64
+pseudo-device random 1
diff --git a/sys/arch/powerpc/conf/TSTdbg b/sys/arch/powerpc/conf/TSTdbg
new file mode 100644
index 00000000000..9a92fda7329
--- /dev/null
+++ b/sys/arch/powerpc/conf/TSTdbg
@@ -0,0 +1,69 @@
+#
+# First try for PPC GENERIC config file
+#
+
+machine powerpc
+
+maxusers 32
+
+# Standard system options (should go into std.powerpc?)
+options SWAPPAGER, VNODEPAGER, DEVPAGER
+options MACHINE_NONCONTIG
+options EXEC_ELF
+options EXEC_SCRIPT
+
+# various hacks due to bugs in Openfirmware implementation
+options FIREPOWERBUGS
+
+#options IPKDBUSERHACK
+#makeoptions DEBUG="-g"
+
+options TCP_COMPAT_42
+options COMPAT_43
+options COMPAT_09
+options COMPAT_10
+options COMPAT_12
+
+options FFS
+options MFS
+
+#options NFSCLIENT
+#options NFSSERVER
+
+options SYSCALL_DEBUG
+
+options CD9660
+options MSDOSFS
+options FDESC
+options FIFO
+options KERNFS
+options NULLFS
+options PORTAL
+options PROCFS
+options UMAPFS
+options UNION
+
+options INET
+options NMBCLUSTERS=1024
+
+options MAXUSERS=20
+options TARGET_ELF
+
+config netbsd swap generic
+
+ofroot* at root
+
+ofbus* at openfirm?
+
+ofdisk* at openfirm?
+
+#ofnet* at openfirm?
+#ipkdbif0 at ofnet?
+
+ofcons* at openfirm?
+
+ofrtc* at openfirm?
+
+pseudo-device loop
+pseudo-device pty 64
+pseudo-device random 1
diff --git a/sys/arch/powerpc/conf/files.powerpc b/sys/arch/powerpc/conf/files.powerpc
new file mode 100644
index 00000000000..d39c334d57e
--- /dev/null
+++ b/sys/arch/powerpc/conf/files.powerpc
@@ -0,0 +1,59 @@
+#
+# First try for powerpc-specific configuration info
+#
+maxpartitions 16
+
+maxusers 2 8 64
+
+#
+# Openfirmware support
+#
+include "../../../dev/ofw/files.ofw"
+major {ofdisk = 0}
+
+file arch/powerpc/powerpc/Locore.c
+file arch/powerpc/powerpc/autoconf.c
+file arch/powerpc/powerpc/bcopy.c
+file arch/powerpc/powerpc/clock.c
+file arch/powerpc/powerpc/conf.c
+file arch/powerpc/powerpc/copyinstr.c
+file arch/powerpc/powerpc/copyoutstr.c
+file arch/powerpc/powerpc/copystr.c
+file arch/powerpc/powerpc/disksubr.c disk
+file arch/powerpc/powerpc/fpu.c
+file arch/powerpc/powerpc/fubyte.c
+file arch/powerpc/powerpc/fuswintr.c
+file arch/powerpc/powerpc/in_cksum.c
+file arch/powerpc/powerpc/ipkdb_glue.c ipkdb
+file arch/powerpc/powerpc/machdep.c
+file arch/powerpc/powerpc/mem.c
+file arch/powerpc/powerpc/ofw_machdep.c
+file arch/powerpc/powerpc/openfirm.c
+file arch/powerpc/powerpc/pmap.c
+file arch/powerpc/powerpc/process_machdep.c
+file arch/powerpc/powerpc/subyte.c
+file arch/powerpc/powerpc/suword.c
+file arch/powerpc/powerpc/suswintr.c
+file arch/powerpc/powerpc/sys_machdep.c
+file arch/powerpc/powerpc/trap.c
+file arch/powerpc/powerpc/vm_machdep.c
+file dev/cons.c
+file dev/cninit.c
+file arch/ppc/ppc/setjmp.S ddb
+file arch/ppc/ppc/db_memrw.c ddb
+file arch/ppc/ppc/db_disasm.c ddb
+file arch/ppc/ppc/db_interface.c ddb
+file arch/ppc/ppc/db_trace.c ddb
+
+# FirePower specific code
+#device firepower: openfirm
+#attach firepower at root
+
+#file arch/powerpc/firepower/firedep.c firepower needs-flag
+#file arch/powerpc/firepower/fireirq.c firepower
+
+# FirePower OpenFirmware Bug Workarounds
+file arch/powerpc/powerpc/ofwreal.S firepowerbugs
+
+include "../../../scsi/files.scsi"
+