diff options
author | Jason Downs <downsj@cvs.openbsd.org> | 1997-07-14 08:15:01 +0000 |
---|---|---|
committer | Jason Downs <downsj@cvs.openbsd.org> | 1997-07-14 08:15:01 +0000 |
commit | 68982ee9315c1d2dfd5ae49889ef59a9a0a2b18e (patch) | |
tree | 49722ae0f8e398f3a79268c08a236e5b9bf0c3ad /sys | |
parent | 5f2612599833ff2e0bc32cb218ce6f42643092b2 (diff) |
The grand reorganization, OpenBSD style.
Lossely based on the NetBSD reorg, but much improved upon, simpler, and doesn't
scribble needless junk into the bootblocks.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/hp300/stand/Makefile | 114 | ||||
-rw-r--r-- | sys/arch/hp300/stand/Makefile.inc | 85 | ||||
-rw-r--r-- | sys/arch/hp300/stand/common/Makefile | 22 | ||||
-rw-r--r-- | sys/arch/hp300/stand/common/apci.c (renamed from sys/arch/hp300/stand/apci.c) | 6 | ||||
-rw-r--r-- | sys/arch/hp300/stand/common/autoconf.c (renamed from sys/arch/hp300/stand/autoconf.c) | 8 | ||||
-rw-r--r-- | sys/arch/hp300/stand/common/cons.c (renamed from sys/arch/hp300/stand/cons.c) | 6 | ||||
-rw-r--r-- | sys/arch/hp300/stand/common/ct.c (renamed from sys/arch/hp300/stand/ct.c) | 4 | ||||
-rw-r--r-- | sys/arch/hp300/stand/common/dca.c (renamed from sys/arch/hp300/stand/dca.c) | 7 | ||||
-rw-r--r-- | sys/arch/hp300/stand/common/dcm.c (renamed from sys/arch/hp300/stand/dcm.c) | 8 | ||||
-rw-r--r-- | sys/arch/hp300/stand/common/dnkbd.c (renamed from sys/arch/hp300/stand/dnkbd.c) | 6 | ||||
-rw-r--r-- | sys/arch/hp300/stand/common/fhpib.c (renamed from sys/arch/hp300/stand/fhpib.c) | 8 | ||||
-rw-r--r-- | sys/arch/hp300/stand/common/hd.c (renamed from sys/arch/hp300/stand/hd.c) | 5 | ||||
-rw-r--r-- | sys/arch/hp300/stand/common/hil.c (renamed from sys/arch/hp300/stand/hil.c) | 7 | ||||
-rw-r--r-- | sys/arch/hp300/stand/common/hpib.c (renamed from sys/arch/hp300/stand/hpib.c) | 8 | ||||
-rw-r--r-- | sys/arch/hp300/stand/common/if_le.c (renamed from sys/arch/hp300/stand/if_le.c) | 8 | ||||
-rw-r--r-- | sys/arch/hp300/stand/common/ite.c (renamed from sys/arch/hp300/stand/ite.c) | 10 | ||||
-rw-r--r-- | sys/arch/hp300/stand/common/ite_dv.c (renamed from sys/arch/hp300/stand/ite_dv.c) | 8 | ||||
-rw-r--r-- | sys/arch/hp300/stand/common/ite_gb.c (renamed from sys/arch/hp300/stand/ite_gb.c) | 7 | ||||
-rw-r--r-- | sys/arch/hp300/stand/common/ite_hy.c (renamed from sys/arch/hp300/stand/ite_hy.c) | 7 | ||||
-rw-r--r-- | sys/arch/hp300/stand/common/ite_rb.c (renamed from sys/arch/hp300/stand/ite_rb.c) | 8 | ||||
-rw-r--r-- | sys/arch/hp300/stand/common/ite_subr.c (renamed from sys/arch/hp300/stand/ite_subr.c) | 8 | ||||
-rw-r--r-- | sys/arch/hp300/stand/common/ite_tc.c (renamed from sys/arch/hp300/stand/ite_tc.c) | 8 | ||||
-rw-r--r-- | sys/arch/hp300/stand/common/kbd.c (renamed from sys/arch/hp300/stand/kbd.c) | 6 | ||||
-rw-r--r-- | sys/arch/hp300/stand/common/kbdconf.c (renamed from sys/arch/hp300/stand/kbdconf.c) | 6 | ||||
-rw-r--r-- | sys/arch/hp300/stand/common/machdep.c (renamed from sys/arch/hp300/stand/machdep.c) | 5 | ||||
-rw-r--r-- | sys/arch/hp300/stand/common/nhpib.c (renamed from sys/arch/hp300/stand/nhpib.c) | 8 | ||||
-rw-r--r-- | sys/arch/hp300/stand/common/prf.c (renamed from sys/arch/hp300/stand/prf.c) | 2 | ||||
-rw-r--r-- | sys/arch/hp300/stand/common/scsi.c (renamed from sys/arch/hp300/stand/scsi.c) | 8 | ||||
-rw-r--r-- | sys/arch/hp300/stand/common/sd.c (renamed from sys/arch/hp300/stand/sd.c) | 4 | ||||
-rw-r--r-- | sys/arch/hp300/stand/common/version.c (renamed from sys/arch/hp300/stand/version.c) | 7 | ||||
-rw-r--r-- | sys/arch/hp300/stand/include/consdefs.h (renamed from sys/arch/hp300/stand/consdefs.h) | 2 | ||||
-rw-r--r-- | sys/arch/hp300/stand/include/device.h (renamed from sys/arch/hp300/stand/device.h) | 2 | ||||
-rw-r--r-- | sys/arch/hp300/stand/include/hpibvar.h (renamed from sys/arch/hp300/stand/hpibvar.h) | 2 | ||||
-rw-r--r-- | sys/arch/hp300/stand/include/if_lereg.h (renamed from sys/arch/hp300/stand/if_lereg.h) | 2 | ||||
-rw-r--r-- | sys/arch/hp300/stand/include/itevar.h (renamed from sys/arch/hp300/stand/itevar.h) | 2 | ||||
-rw-r--r-- | sys/arch/hp300/stand/include/kbdvar.h (renamed from sys/arch/hp300/stand/kbdvar.h) | 2 | ||||
-rw-r--r-- | sys/arch/hp300/stand/include/rominfo.h (renamed from sys/arch/hp300/stand/rominfo.h) | 2 | ||||
-rw-r--r-- | sys/arch/hp300/stand/include/samachdep.h (renamed from sys/arch/hp300/stand/samachdep.h) | 2 | ||||
-rw-r--r-- | sys/arch/hp300/stand/include/scsivar.h (renamed from sys/arch/hp300/stand/scsivar.h) | 2 | ||||
-rw-r--r-- | sys/arch/hp300/stand/include/volhdr.h (renamed from sys/arch/hp300/stand/volhdr.h) | 2 | ||||
-rw-r--r-- | sys/arch/hp300/stand/installboot/Makefile | 10 | ||||
-rw-r--r-- | sys/arch/hp300/stand/installboot/installboot.sh (renamed from sys/arch/hp300/stand/installboot.sh) | 2 | ||||
-rw-r--r-- | sys/arch/hp300/stand/libkern/Makefile | 10 | ||||
-rw-r--r-- | sys/arch/hp300/stand/libkern/Makefile.inc | 31 | ||||
-rw-r--r-- | sys/arch/hp300/stand/libsa/Makefile | 23 | ||||
-rw-r--r-- | sys/arch/hp300/stand/libsa/Makefile.inc | 32 | ||||
-rw-r--r-- | sys/arch/hp300/stand/libsa/devopen.c (renamed from sys/arch/hp300/stand/devopen.c) | 4 | ||||
-rw-r--r-- | sys/arch/hp300/stand/libsa/rawfs.c (renamed from sys/arch/hp300/stand/rawfs.c) | 4 | ||||
-rw-r--r-- | sys/arch/hp300/stand/libsa/rawfs.h (renamed from sys/arch/hp300/stand/rawfs.h) | 2 | ||||
-rw-r--r-- | sys/arch/hp300/stand/libz/Makefile | 19 | ||||
-rw-r--r-- | sys/arch/hp300/stand/mkboot/Makefile | 13 | ||||
-rw-r--r-- | sys/arch/hp300/stand/mkboot/mkboot.c (renamed from sys/arch/hp300/stand/mkboot.c) | 8 | ||||
-rw-r--r-- | sys/arch/hp300/stand/srt0.s | 325 | ||||
-rw-r--r-- | sys/arch/hp300/stand/uboot/Makefile | 51 | ||||
-rw-r--r-- | sys/arch/hp300/stand/uboot/clock.c (renamed from sys/arch/hp300/stand/clock.c) | 4 | ||||
-rw-r--r-- | sys/arch/hp300/stand/uboot/conf.c (renamed from sys/arch/hp300/stand/conf.c) | 6 | ||||
-rw-r--r-- | sys/arch/hp300/stand/uboot/netio.c (renamed from sys/arch/hp300/stand/netio.c) | 6 | ||||
-rw-r--r-- | sys/arch/hp300/stand/uboot/srt0.S | 324 | ||||
-rw-r--r-- | sys/arch/hp300/stand/uboot/tgets.c (renamed from sys/arch/hp300/stand/tgets.c) | 2 | ||||
-rw-r--r-- | sys/arch/hp300/stand/uboot/uboot.c (renamed from sys/arch/hp300/stand/uboot.c) | 4 |
60 files changed, 676 insertions, 628 deletions
diff --git a/sys/arch/hp300/stand/Makefile b/sys/arch/hp300/stand/Makefile index d20ea626bf6..0942ebce943 100644 --- a/sys/arch/hp300/stand/Makefile +++ b/sys/arch/hp300/stand/Makefile @@ -1,112 +1,6 @@ -# $OpenBSD: Makefile,v 1.11 1997/07/13 07:21:43 downsj Exp $ -# $NetBSD: Makefile,v 1.22 1996/10/18 06:03:25 thorpej Exp $ -# @(#)Makefile 8.1 (Berkeley) 6/10/93 +# $OpenBSD: Makefile,v 1.12 1997/07/14 08:13:24 downsj Exp $ +# $NetBSD: Makefile,v 1.23 1997/02/04 03:51:37 thorpej Exp $ -NOPROG= noprog -NOMAN= noman +SUBDIR= libsa libkern libz common mkboot uboot installboot -#SUBDIR= libkern libsa - -# RELOC=FFF00000 allows for boot prog up to FF000 (1044480) bytes long -RELOC= FFF00000 - -CONS= -DDCACONSOLE -DITECONSOLE -DDCMCONSOLE -DAPCICONSOLE -CONS+= -DHIL_KEYBOARD -DUK_KEYBOARD -DDOMAIN_KEYBOARD -DEFS= -DSTANDALONE ${CONS} -Dhp300 -#DEFS+= -DNETIF_DEBUG -DRPC_DEBUG -DNFS_DEBUG -DRARP_DEBUG -DNET_DEBUG -#DEFS+= -DLE_DEBUG -CFLAGS= -O3 -msoft-float ${INCPATH} ${DEFS} - -SRCS= apci.c autoconf.c cons.c ct.c dca.c dcm.c devopen.c dnkbd.c fhpib.c \ - hd.c hil.c hpib.c if_le.c ite.c ite_dv.c ite_gb.c ite_rb.c \ - ite_subr.c ite_tc.c ite_hy.c kbd.c kbdconf.c kbdvar.h machdep.c \ - nhpib.c prf.c scsi.c sd.c version.c -OBJS= ${SRCS:N*.h:R:S/$/.o/g} - -S= ${.CURDIR}/../../.. - -.PATH: ${S}/arch/${MACHINE_ARCH}/${MACHINE_ARCH} -.PATH: ${S}/stand - -INCPATH=-I${.CURDIR} -I${.CURDIR}/../.. -I${S} -I${S}/lib/libsa - -.include "${.CURDIR}/libkern/Makefile.inc" -LIBKERN= ${KERN_LIB} - -### find out what to use for libz -Z_AS= library -.include "${S}/lib/libz/Makefile.inc" -LIBZ= ${ZLIB} - -.include "${.CURDIR}/libsa/Makefile.inc" -LIBSA= ${SA_LIB} - -LIBS= ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} - -BOOTS= uboot.lif -BOOTAOUTS=uboot -ALL= ${BOOTS} mkboot installboot - -all: ${ALL} - -${BOOTS}: ${LIBS} - -# depend on CFLAGS - -${OBJS}: Makefile - -# startups - -srt0.o: ${.CURDIR}/srt0.s - ${CC} ${INCPATH} ${DEFS} -c ${.CURDIR}/srt0.s - -# unified boot program (disk, network, tape) -uboot.lif: uboot mkboot - ./mkboot uboot $@ - -uboot: srt0.o uboot.o tgets.o netio.o clock.o conf.o ${LIBS} - ${LD} -N -T ${RELOC} -e begin srt0.o uboot.o tgets.o netio.o clock.o \ - conf.o ${LIBS} -o $@ - @size $@ - @echo $@ total size should not exceed 1044480 bytes - -# helper program ... turns OMAGIC into LIF -mkboot: ${.CURDIR}/mkboot.c - ${CC} ${CFLAGS} ${.CURDIR}/mkboot.c -o $@ - -installboot: ${.CURDIR}/installboot.sh - @rm -f installboot - cp -p ${.CURDIR}/installboot.sh installboot - -# utilities - -clean:: - rm -f *.o *.i - rm -f a.out ${BOOTS} ${BOOTAOUTS} - rm -f mkboot installboot - -install: - ${INSTALL} -d -m 755 -o ${BINOWN} -g ${BINGRP} \ - ${DESTDIR}/usr/mdec/rbootd - ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 555 installboot \ - ${DESTDIR}/usr/mdec - ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 uboot.lif \ - ${DESTDIR}/usr/mdec - rm -f ${DESTDIR}/usr/mdec/hdboot - ln ${DESTDIR}/usr/mdec/uboot.lif ${DESTDIR}/usr/mdec/hdboot - rm -f ${DESTDIR}/usr/mdec/boothd - ln ${DESTDIR}/usr/mdec/uboot.lif ${DESTDIR}/usr/mdec/boothd - rm -f ${DESTDIR}/usr/mdec/sdboot - ln ${DESTDIR}/usr/mdec/uboot.lif ${DESTDIR}/usr/mdec/sdboot - rm -f ${DESTDIR}/usr/mdec/bootsd - ln ${DESTDIR}/usr/mdec/uboot.lif ${DESTDIR}/usr/mdec/bootsd - rm -f ${DESTDIR}/usr/mdec/ctboot - ln ${DESTDIR}/usr/mdec/uboot.lif ${DESTDIR}/usr/mdec/ctboot - rm -f ${DESTDIR}/usr/mdec/bootct - ln ${DESTDIR}/usr/mdec/uboot.lif ${DESTDIR}/usr/mdec/bootct - rm -f ${DESTDIR}/usr/mdec/rbootd/SYS_UBOOT - ln ${DESTDIR}/usr/mdec/uboot.lif ${DESTDIR}/usr/mdec/rbootd/SYS_UBOOT - -#obj: _SUBDIRUSE - -.include <bsd.prog.mk> +.include <bsd.subdir.mk> diff --git a/sys/arch/hp300/stand/Makefile.inc b/sys/arch/hp300/stand/Makefile.inc new file mode 100644 index 00000000000..4cb194fad37 --- /dev/null +++ b/sys/arch/hp300/stand/Makefile.inc @@ -0,0 +1,85 @@ +# $OpenBSD: Makefile.inc,v 1.1 1997/07/14 08:13:25 downsj Exp $ +# $NetBSD: Makefile.inc,v 1.7 1997/05/12 07:43:18 thorpej Exp $ + +BINDIR= /usr/mdec + +# RELOC=FFF00000 allows for boot prog up to FF000 (1044480) bytes long +RELOC= FFF00000 + +CPPFLAGS+= -DDCACONSOLE -DAPCICONSOLE -DITECONSOLE -DDCMCONSOLE +CPPFLAGS+= -DHIL_KEYBOARD -DUK_KEYBOARD +CPPFLAGS+= -DDOMAIN_KEYBOARD +CPPFLAGS+= -DSTANDALONE -Dhp300 +CPPFLAGS+= -DCOMPAT_UFS -DNO_LSEEK + +# Limit the alloc() heap to below the msgbuf and ROM scratch pages. +CPPFLAGS+= -DHEAP_LIMIT="0xffffdfff" + +### Figure out what to use for libcommon +COMMONDIR= ${.CURDIR}/../common + +.if exists(${COMMONDIR}/obj.${MACHINE}) +COMMONOBJDIR= ${COMMONDIR}/obj.${MACHINE} +.elif exists(${COMMONDIR}/obj) +COMMONOBJDIR= ${COMMONDIR}/obj +.else +COMMONOBJDIR= ${COMMONDIR} +.endif + +LIBCOMMON= ${COMMONOBJDIR}/libcommon.a + +### Figure out what to use for libkern +LIBKERNDIR= ${.CURDIR}/../libkern + +.if exists(${LIBKERNDIR}/obj.${MACHINE}) +LIBKERNOBJDIR= ${LIBKERNDIR}/obj.${MACHINE} +.elif exists(${LIBKERNDIR}/obj) +LIBKERNOBJDIR= ${LIBKERNDIR}/obj +.else +LIBKERNOBJDIR= ${LIBKERNDIR} +.endif + +LIBKERN= ${LIBKERNOBJDIR}/libkern.a + +### Figure out what to use for libsa +LIBSADIR= ${.CURDIR}/../libsa + +.if exists(${LIBSADIR}/obj.${MACHINE}) +LIBSAOBJDIR= ${LIBSADIR}/obj.${MACHINE} +.elif exists(${LIBSADIR}/obj) +LIBSAOBJDIR= ${LIBSADIR}/obj +.else +LIBSAOBJDIR= ${LIBSADIR} +.endif + +LIBSA= ${LIBSAOBJDIR}/libsa.a + +### Figure out what to use for libz +LIBZDIR= ${.CURDIR}/../libz + +.if exists(${LIBZDIR}/obj.${MACHINE}) +LIBZOBJDIR= ${LIBZDIR}/obj.${MACHINE} +.elif exists(${LIBZDIR}/obj) +LIBZOBJDIR= ${LIBZDIR}/obj +.else +LIBZOBJDIR= ${LIBZDIR} +.endif + +LIBZ= ${LIBZOBJDIR}/libz.a + +### Figure out what to use for mkboot +MKBOOTDIR= ${.CURDIR}/../mkboot + +.if exists(${MKBOOTDIR}/obj.${MACHINE}) +MKBOOTOBJDIR= ${MKBOOTDIR}/obj.${MACHINE} +.elif exists(${MKBOOTDIR}/obj) +MKBOOTOBJDIR= ${MKBOOTDIR}/obj +.else +MKBOOTOBJDIR= ${MKBOOTDIR} +.endif + +MKBOOT_PROG= ${MKBOOTOBJDIR}/mkboot + +# Make sure ${MKBOOT_PROG} is always available +${MKBOOT_PROG}: + @cd ${MKBOOTDIR} && make depend && make diff --git a/sys/arch/hp300/stand/common/Makefile b/sys/arch/hp300/stand/common/Makefile new file mode 100644 index 00000000000..d0a8404fa43 --- /dev/null +++ b/sys/arch/hp300/stand/common/Makefile @@ -0,0 +1,22 @@ +# $OpenBSD: Makefile,v 1.1 1997/07/14 08:14:05 downsj Exp $ + +LIB= common + +NOMAN= noman + +SRCS= apci.c autoconf.c cons.c ct.c dca.c dcm.c dnkbd.c \ + fhpib.c hd.c hil.c hpib.c if_le.c ite.c ite_dv.c ite_gb.c ite_rb.c \ + ite_subr.c ite_tc.c ite_hy.c kbd.c kbdconf.c kbdvar.h machdep.c \ + nhpib.c prf.c scsi.c sd.c version.c + +CFLAGS= -O3 -msoft-float -I${.CURDIR}/../include \ + -I${.CURDIR}/../../.. -I${.CURDIR}/../../../.. + +${OBJS}: ${.CURDIR}/../Makefile.inc + +NOPROFILE= +NOPIC= + +install: + +.include <bsd.lib.mk> diff --git a/sys/arch/hp300/stand/apci.c b/sys/arch/hp300/stand/common/apci.c index 5de5a32b831..fc3ebc54b7e 100644 --- a/sys/arch/hp300/stand/apci.c +++ b/sys/arch/hp300/stand/common/apci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apci.c,v 1.1 1997/07/13 07:21:44 downsj Exp $ */ +/* $OpenBSD: apci.c,v 1.1 1997/07/14 08:14:06 downsj Exp $ */ /* $NetBSD: apci.c,v 1.1 1997/05/12 07:41:55 thorpej Exp $ */ /* @@ -50,8 +50,8 @@ #include <hp300/dev/apcireg.h> /* for register map */ #include <hp300/dev/dcareg.h> /* for register bits */ -#include <hp300/stand/consdefs.h> -#include <hp300/stand/samachdep.h> +#include "consdefs.h" +#include "samachdep.h" struct apciregs *apcicnaddr = 0; diff --git a/sys/arch/hp300/stand/autoconf.c b/sys/arch/hp300/stand/common/autoconf.c index 274073a3a04..987122c8053 100644 --- a/sys/arch/hp300/stand/autoconf.c +++ b/sys/arch/hp300/stand/common/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.3 1997/02/03 04:48:01 downsj Exp $ */ +/* $OpenBSD: autoconf.c,v 1.1 1997/07/14 08:14:07 downsj Exp $ */ /* $NetBSD: autoconf.c,v 1.12 1997/01/30 10:32:51 thorpej Exp $ */ /* @@ -46,9 +46,9 @@ #include <sys/param.h> #include <sys/reboot.h> -#include <hp300/stand/samachdep.h> -#include <hp300/stand/rominfo.h> -#include <hp300/stand/device.h> +#include "samachdep.h" +#include "rominfo.h" +#include "device.h" #include <hp300/dev/grfreg.h> diff --git a/sys/arch/hp300/stand/cons.c b/sys/arch/hp300/stand/common/cons.c index 20b0d32232f..4132a82c053 100644 --- a/sys/arch/hp300/stand/cons.c +++ b/sys/arch/hp300/stand/common/cons.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cons.c,v 1.3 1997/07/13 07:21:45 downsj Exp $ */ +/* $OpenBSD: cons.c,v 1.1 1997/07/14 08:14:08 downsj Exp $ */ /* $NetBSD: cons.c,v 1.2 1997/05/12 07:44:53 thorpej Exp $ */ /* @@ -46,8 +46,8 @@ #include <sys/param.h> #include <dev/cons.h> -#include <hp300/stand/consdefs.h> -#include <hp300/stand/samachdep.h> +#include "consdefs.h" +#include "samachdep.h" struct consdev constab[] = { #ifdef ITECONSOLE diff --git a/sys/arch/hp300/stand/ct.c b/sys/arch/hp300/stand/common/ct.c index b8b5acf9dd7..a974c4e95e1 100644 --- a/sys/arch/hp300/stand/ct.c +++ b/sys/arch/hp300/stand/common/ct.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ct.c,v 1.3 1997/07/13 07:21:46 downsj Exp $ */ +/* $OpenBSD: ct.c,v 1.1 1997/07/14 08:14:09 downsj Exp $ */ /* $NetBSD: ct.c,v 1.9 1996/10/14 07:29:57 thorpej Exp $ */ /* @@ -45,7 +45,7 @@ #include <lib/libsa/stand.h> -#include <hp300/stand/samachdep.h> +#include "samachdep.h" struct ct_iocmd ct_ioc; struct ct_rscmd ct_rsc; diff --git a/sys/arch/hp300/stand/dca.c b/sys/arch/hp300/stand/common/dca.c index 0434fa026ee..690df01c1fe 100644 --- a/sys/arch/hp300/stand/dca.c +++ b/sys/arch/hp300/stand/common/dca.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dca.c,v 1.3 1997/01/17 08:32:42 downsj Exp $ */ +/* $OpenBSD: dca.c,v 1.1 1997/07/14 08:14:10 downsj Exp $ */ /* $NetBSD: dca.c,v 1.10 1996/10/06 01:42:48 mycroft Exp $ */ /* @@ -46,8 +46,9 @@ #include <dev/cons.h> #include <hp300/dev/dcareg.h> -#include <hp300/stand/consdefs.h> -#include <hp300/stand/samachdep.h> + +#include "consdefs.h" +#include "samachdep.h" /* If not using 4.4 devs */ #ifndef dca_reset diff --git a/sys/arch/hp300/stand/dcm.c b/sys/arch/hp300/stand/common/dcm.c index 0724e723d8e..3dfb4d56e1a 100644 --- a/sys/arch/hp300/stand/dcm.c +++ b/sys/arch/hp300/stand/common/dcm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dcm.c,v 1.5 1997/04/16 11:56:37 downsj Exp $ */ +/* $OpenBSD: dcm.c,v 1.1 1997/07/14 08:14:11 downsj Exp $ */ /* $NetBSD: dcm.c,v 1.2 1997/04/14 05:58:32 scottr Exp $ */ /* @@ -47,9 +47,9 @@ #include <hp300/dev/dcmreg.h> -#include <hp300/stand/consdefs.h> -#include <hp300/stand/samachdep.h> -#include <hp300/stand/device.h> +#include "consdefs.h" +#include "samachdep.h" +#include "device.h" struct dcmdevice *dcmcnaddr = NULL; diff --git a/sys/arch/hp300/stand/dnkbd.c b/sys/arch/hp300/stand/common/dnkbd.c index 054a848ebf2..b4f2c119a09 100644 --- a/sys/arch/hp300/stand/dnkbd.c +++ b/sys/arch/hp300/stand/common/dnkbd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dnkbd.c,v 1.2 1997/07/13 07:21:47 downsj Exp $ */ +/* $OpenBSD: dnkbd.c,v 1.1 1997/07/14 08:14:12 downsj Exp $ */ /* $NetBSD: dnkbd.c,v 1.3 1997/05/12 07:47:03 thorpej Exp $ */ /*- @@ -49,8 +49,8 @@ #include <hp300/dev/dcareg.h> /* for the register bit defintions */ #include <hp300/dev/apcireg.h> /* for the apci registers */ -#include <hp300/stand/samachdep.h> -#include <hp300/stand/kbdvar.h> +#include "samachdep.h" +#include "kbdvar.h" #ifndef SMALL diff --git a/sys/arch/hp300/stand/fhpib.c b/sys/arch/hp300/stand/common/fhpib.c index 1980353969c..e266adccdf2 100644 --- a/sys/arch/hp300/stand/fhpib.c +++ b/sys/arch/hp300/stand/common/fhpib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fhpib.c,v 1.2 1997/01/17 08:32:44 downsj Exp $ */ +/* $OpenBSD: fhpib.c,v 1.1 1997/07/14 08:14:12 downsj Exp $ */ /* $NetBSD: fhpib.c,v 1.5 1995/08/05 16:47:42 thorpej Exp $ */ /* @@ -41,9 +41,11 @@ */ #include <sys/param.h> + #include <hp300/dev/fhpibreg.h> -#include <hp300/stand/hpibvar.h> -#include <hp300/stand/samachdep.h> + +#include "hpibvar.h" +#include "samachdep.h" fhpibinit(unit) register int unit; diff --git a/sys/arch/hp300/stand/hd.c b/sys/arch/hp300/stand/common/hd.c index 22f76c9c192..71e3e8007ce 100644 --- a/sys/arch/hp300/stand/hd.c +++ b/sys/arch/hp300/stand/common/hd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hd.c,v 1.2 1997/07/13 07:21:47 downsj Exp $ */ +/* $OpenBSD: hd.c,v 1.1 1997/07/14 08:14:13 downsj Exp $ */ /* $NetBSD: rd.c,v 1.11 1996/12/21 21:34:40 thorpej Exp $ */ /* @@ -51,7 +51,8 @@ #include <lib/libsa/stand.h> -#include <hp300/stand/samachdep.h> +#include "samachdep.h" + #include <hp300/dev/hdreg.h> struct hd_iocmd hd_ioc; diff --git a/sys/arch/hp300/stand/hil.c b/sys/arch/hp300/stand/common/hil.c index 51338ca57fa..55b6efb4333 100644 --- a/sys/arch/hp300/stand/hil.c +++ b/sys/arch/hp300/stand/common/hil.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hil.c,v 1.5 1997/07/13 07:21:48 downsj Exp $ */ +/* $OpenBSD: hil.c,v 1.1 1997/07/14 08:14:15 downsj Exp $ */ /* $NetBSD: hil.c,v 1.2 1997/04/14 19:00:10 thorpej Exp $ */ /* @@ -52,12 +52,13 @@ #include <sys/param.h> #include <sys/device.h> /* XXX */ + #include <hp300/dev/hilreg.h> #include <hp300/dev/kbdmap.h> #include <hp300/dev/itevar.h> -#include <hp300/stand/samachdep.h> -#include <hp300/stand/kbdvar.h> +#include "samachdep.h" +#include "kbdvar.h" #ifndef SMALL diff --git a/sys/arch/hp300/stand/hpib.c b/sys/arch/hp300/stand/common/hpib.c index bc916952226..bb0d283e766 100644 --- a/sys/arch/hp300/stand/hpib.c +++ b/sys/arch/hp300/stand/common/hpib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hpib.c,v 1.4 1997/07/13 07:21:48 downsj Exp $ */ +/* $OpenBSD: hpib.c,v 1.1 1997/07/14 08:14:15 downsj Exp $ */ /* $NetBSD: hpib.c,v 1.2 1997/05/12 07:48:23 thorpej Exp $ */ /* @@ -44,10 +44,10 @@ #include <lib/libsa/stand.h> -#include <hp300/stand/device.h> -#include <hp300/stand/hpibvar.h> +#include "device.h" +#include "hpibvar.h" -#include <hp300/stand/samachdep.h> +#include "samachdep.h" #include <hp300/dev/dioreg.h> diff --git a/sys/arch/hp300/stand/if_le.c b/sys/arch/hp300/stand/common/if_le.c index 55e0e8ce427..802722993b6 100644 --- a/sys/arch/hp300/stand/if_le.c +++ b/sys/arch/hp300/stand/common/if_le.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_le.c,v 1.7 1997/07/13 07:21:49 downsj Exp $ */ +/* $OpenBSD: if_le.c,v 1.1 1997/07/14 08:14:16 downsj Exp $ */ /* $NetBSD: if_le.c,v 1.9 1997/01/30 10:32:54 thorpej Exp $ */ /* @@ -41,10 +41,10 @@ #include <lib/libsa/stand.h> #include <lib/libsa/netif.h> -#include <hp300/stand/device.h> -#include <hp300/stand/if_lereg.h> +#include "device.h" +#include "if_lereg.h" -#include <hp300/stand/samachdep.h> +#include "samachdep.h" #ifndef NLE #define NLE 1 diff --git a/sys/arch/hp300/stand/ite.c b/sys/arch/hp300/stand/common/ite.c index 0afe5beb519..41ce3e30086 100644 --- a/sys/arch/hp300/stand/ite.c +++ b/sys/arch/hp300/stand/common/ite.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ite.c,v 1.4 1997/02/03 04:48:06 downsj Exp $ */ +/* $OpenBSD: ite.c,v 1.1 1997/07/14 08:14:17 downsj Exp $ */ /* $NetBSD: ite.c,v 1.12 1997/01/30 10:32:55 thorpej Exp $ */ /* @@ -54,10 +54,10 @@ #include <hp300/dev/grfreg.h> -#include <hp300/stand/device.h> -#include <hp300/stand/itevar.h> -#include <hp300/stand/consdefs.h> -#include <hp300/stand/samachdep.h> +#include "device.h" +#include "itevar.h" +#include "consdefs.h" +#include "samachdep.h" void ite_deinit_noop __P((struct ite_data *)); diff --git a/sys/arch/hp300/stand/ite_dv.c b/sys/arch/hp300/stand/common/ite_dv.c index 67fab804395..60066d37c22 100644 --- a/sys/arch/hp300/stand/ite_dv.c +++ b/sys/arch/hp300/stand/common/ite_dv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ite_dv.c,v 1.3 1997/01/17 08:32:48 downsj Exp $ */ +/* $OpenBSD: ite_dv.c,v 1.1 1997/07/14 08:14:18 downsj Exp $ */ /* $NetBSD: ite_dv.c,v 1.8 1996/03/03 04:23:35 thorpej Exp $ */ /* @@ -43,12 +43,14 @@ * @(#)ite_dv.c 8.1 (Berkeley) 6/10/93 */ -#include <hp300/stand/samachdep.h> +#include "samachdep.h" #ifdef ITECONSOLE #include <sys/param.h> -#include <hp300/stand/itevar.h> + +#include "itevar.h" + #include <hp300/dev/itereg.h> #include <hp300/dev/grf_dvreg.h> diff --git a/sys/arch/hp300/stand/ite_gb.c b/sys/arch/hp300/stand/common/ite_gb.c index ddcf27bb189..d94cf3810c8 100644 --- a/sys/arch/hp300/stand/ite_gb.c +++ b/sys/arch/hp300/stand/common/ite_gb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ite_gb.c,v 1.3 1997/01/17 08:32:49 downsj Exp $ */ +/* $OpenBSD: ite_gb.c,v 1.1 1997/07/14 08:14:19 downsj Exp $ */ /* $NetBSD: ite_gb.c,v 1.8 1996/03/03 04:23:36 thorpej Exp $ */ /* @@ -43,13 +43,14 @@ * @(#)ite_gb.c 8.1 (Berkeley) 6/10/93 */ -#include <hp300/stand/samachdep.h> +#include "samachdep.h" #ifdef ITECONSOLE #include <sys/param.h> -#include <hp300/stand/itevar.h> +#include "itevar.h" + #include <hp300/dev/itereg.h> #include <hp300/dev/grf_gbreg.h> diff --git a/sys/arch/hp300/stand/ite_hy.c b/sys/arch/hp300/stand/common/ite_hy.c index aeefc6207ae..1aebd1b2c43 100644 --- a/sys/arch/hp300/stand/ite_hy.c +++ b/sys/arch/hp300/stand/common/ite_hy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ite_hy.c,v 1.3 1997/01/17 08:32:49 downsj Exp $ */ +/* $OpenBSD: ite_hy.c,v 1.1 1997/07/14 08:14:20 downsj Exp $ */ /* $NetBSD: ite_hy.c,v 1.3 1996/03/03 04:23:37 thorpej Exp $ */ /* @@ -44,12 +44,13 @@ * @(#)ite_hy.c 8.1 (Berkeley) 6/10/93 */ -#include <hp300/stand/samachdep.h> +#include "samachdep.h" #ifdef ITECONSOLE #include <sys/param.h> -#include <hp300/stand/itevar.h> +#include "itevar.h" + #include <hp300/dev/itereg.h> #include <hp300/dev/grf_hyreg.h> diff --git a/sys/arch/hp300/stand/ite_rb.c b/sys/arch/hp300/stand/common/ite_rb.c index 196cf522daa..a8c1f7375d4 100644 --- a/sys/arch/hp300/stand/ite_rb.c +++ b/sys/arch/hp300/stand/common/ite_rb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ite_rb.c,v 1.3 1997/01/17 08:32:50 downsj Exp $ */ +/* $OpenBSD: ite_rb.c,v 1.1 1997/07/14 08:14:21 downsj Exp $ */ /* $NetBSD: ite_rb.c,v 1.8 1996/03/03 04:23:38 thorpej Exp $ */ /* @@ -43,12 +43,14 @@ * @(#)ite_rb.c 8.1 (Berkeley) 6/10/93 */ -#include <hp300/stand/samachdep.h> +#include "samachdep.h" #ifdef ITECONSOLE #include <sys/param.h> -#include <hp300/stand/itevar.h> + +#include "itevar.h" + #include <hp300/dev/itereg.h> #include <hp300/dev/grf_rbreg.h> diff --git a/sys/arch/hp300/stand/ite_subr.c b/sys/arch/hp300/stand/common/ite_subr.c index 049e227ab3a..d0db2c5b424 100644 --- a/sys/arch/hp300/stand/ite_subr.c +++ b/sys/arch/hp300/stand/common/ite_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ite_subr.c,v 1.3 1997/01/17 08:32:51 downsj Exp $ */ +/* $OpenBSD: ite_subr.c,v 1.1 1997/07/14 08:14:22 downsj Exp $ */ /* $NetBSD: ite_subr.c,v 1.8 1996/03/03 04:23:40 thorpej Exp $ */ /* @@ -43,12 +43,14 @@ * @(#)ite_subr.c 8.1 (Berkeley) 6/10/93 */ -#include <hp300/stand/samachdep.h> +#include "samachdep.h" #ifdef ITECONSOLE #include <sys/param.h> -#include <hp300/stand/itevar.h> + +#include "itevar.h" + #include <hp300/dev/itereg.h> ite_fontinfo(ip) diff --git a/sys/arch/hp300/stand/ite_tc.c b/sys/arch/hp300/stand/common/ite_tc.c index 4dae2081322..e7800786fd2 100644 --- a/sys/arch/hp300/stand/ite_tc.c +++ b/sys/arch/hp300/stand/common/ite_tc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ite_tc.c,v 1.3 1997/01/17 08:32:51 downsj Exp $ */ +/* $OpenBSD: ite_tc.c,v 1.1 1997/07/14 08:14:22 downsj Exp $ */ /* $NetBSD: ite_tc.c,v 1.8 1996/03/03 04:23:41 thorpej Exp $ */ /* @@ -43,12 +43,14 @@ * @(#)ite_tc.c 8.1 (Berkeley) 6/10/93 */ -#include <hp300/stand/samachdep.h> +#include "samachdep.h" #ifdef ITECONSOLE #include <sys/param.h> -#include <hp300/stand/itevar.h> + +#include "itevar.h" + #include <hp300/dev/itereg.h> #include <hp300/dev/grfreg.h> #include <hp300/dev/grf_tcreg.h> diff --git a/sys/arch/hp300/stand/kbd.c b/sys/arch/hp300/stand/common/kbd.c index 7c3a1061533..1c2bc09cd56 100644 --- a/sys/arch/hp300/stand/kbd.c +++ b/sys/arch/hp300/stand/common/kbd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kbd.c,v 1.2 1997/07/13 07:21:49 downsj Exp $ */ +/* $OpenBSD: kbd.c,v 1.1 1997/07/14 08:14:23 downsj Exp $ */ /* $NetBSD: kbd.c,v 1.2 1997/05/12 07:51:32 thorpej Exp $ */ /*- @@ -45,8 +45,8 @@ #include <sys/param.h> -#include <hp300/stand/samachdep.h> -#include <hp300/stand/kbdvar.h> +#include "samachdep.h" +#include "kbdvar.h" #ifndef SMALL diff --git a/sys/arch/hp300/stand/kbdconf.c b/sys/arch/hp300/stand/common/kbdconf.c index f80871eaf89..8d854c25a54 100644 --- a/sys/arch/hp300/stand/kbdconf.c +++ b/sys/arch/hp300/stand/common/kbdconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kbdconf.c,v 1.2 1997/07/13 07:21:50 downsj Exp $ */ +/* $OpenBSD: kbdconf.c,v 1.1 1997/07/14 08:14:24 downsj Exp $ */ /* $NetBSD: kbdconf.c,v 1.1 1997/04/14 19:00:12 thorpej Exp $ */ /*- @@ -45,8 +45,8 @@ #include <sys/param.h> -#include <hp300/stand/samachdep.h> -#include <hp300/stand/kbdvar.h> +#include "samachdep.h" +#include "kbdvar.h" #ifndef SMALL diff --git a/sys/arch/hp300/stand/machdep.c b/sys/arch/hp300/stand/common/machdep.c index 227957c36cf..581ba56b5ec 100644 --- a/sys/arch/hp300/stand/machdep.c +++ b/sys/arch/hp300/stand/common/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.7 1997/07/13 09:43:31 downsj Exp $ */ +/* $OpenBSD: machdep.c,v 1.1 1997/07/14 08:14:25 downsj Exp $ */ /* $NetBSD: machdep.c,v 1.4 1997/06/28 07:20:25 thorpej Exp $ */ /* @@ -44,7 +44,8 @@ */ #include <sys/param.h> -#include <hp300/stand/samachdep.h> + +#include "samachdep.h" char * getmachineid() diff --git a/sys/arch/hp300/stand/nhpib.c b/sys/arch/hp300/stand/common/nhpib.c index 24bf2487402..2ab2fd52745 100644 --- a/sys/arch/hp300/stand/nhpib.c +++ b/sys/arch/hp300/stand/common/nhpib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nhpib.c,v 1.2 1997/01/17 08:32:55 downsj Exp $ */ +/* $OpenBSD: nhpib.c,v 1.1 1997/07/14 08:14:26 downsj Exp $ */ /* $NetBSD: nhpib.c,v 1.5 1995/08/05 16:47:46 thorpej Exp $ */ /* @@ -41,9 +41,11 @@ */ #include <sys/param.h> + #include <hp300/dev/nhpibreg.h> -#include <hp300/stand/hpibvar.h> -#include <hp300/stand/samachdep.h> + +#include "hpibvar.h" +#include "samachdep.h" nhpibinit(unit) { diff --git a/sys/arch/hp300/stand/prf.c b/sys/arch/hp300/stand/common/prf.c index 120018b9c78..14a41a35cd3 100644 --- a/sys/arch/hp300/stand/prf.c +++ b/sys/arch/hp300/stand/common/prf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: prf.c,v 1.2 1997/01/17 08:32:56 downsj Exp $ */ +/* $OpenBSD: prf.c,v 1.1 1997/07/14 08:14:27 downsj Exp $ */ /* $NetBSD: prf.c,v 1.5 1994/10/26 07:27:50 cgd Exp $ */ /* diff --git a/sys/arch/hp300/stand/scsi.c b/sys/arch/hp300/stand/common/scsi.c index 7366e73c3ac..986dc38777d 100644 --- a/sys/arch/hp300/stand/scsi.c +++ b/sys/arch/hp300/stand/common/scsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scsi.c,v 1.4 1997/07/13 07:21:52 downsj Exp $ */ +/* $OpenBSD: scsi.c,v 1.1 1997/07/14 08:14:28 downsj Exp $ */ /* $NetBSD: scsi.c,v 1.7 1997/01/30 10:32:57 thorpej Exp $ */ /* @@ -59,12 +59,12 @@ #define _IOCTL_ #include <hp300/dev/scsireg.h> -#include <hp300/stand/device.h> -#include <hp300/stand/scsivar.h> +#include "device.h" +#include "scsivar.h" #include <lib/libsa/stand.h> -#include <hp300/stand/samachdep.h> +#include "samachdep.h" struct scsi_softc scsi_softc[NSCSI]; diff --git a/sys/arch/hp300/stand/sd.c b/sys/arch/hp300/stand/common/sd.c index a6379338010..e27eb8f1978 100644 --- a/sys/arch/hp300/stand/sd.c +++ b/sys/arch/hp300/stand/common/sd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sd.c,v 1.3 1997/07/13 07:21:53 downsj Exp $ */ +/* $OpenBSD: sd.c,v 1.1 1997/07/14 08:14:29 downsj Exp $ */ /* $NetBSD: sd.c,v 1.9 1996/12/21 21:34:41 thorpej Exp $ */ /* @@ -52,7 +52,7 @@ #include <lib/libsa/stand.h> -#include <hp300/stand/samachdep.h> +#include "samachdep.h" #define _IOCTL_ #include <hp300/dev/scsireg.h> diff --git a/sys/arch/hp300/stand/version.c b/sys/arch/hp300/stand/common/version.c index 20220cc5934..932fb1c95fc 100644 --- a/sys/arch/hp300/stand/version.c +++ b/sys/arch/hp300/stand/common/version.c @@ -1,4 +1,4 @@ -/* $OpenBSD: version.c,v 1.2 1997/07/13 07:21:54 downsj Exp $ */ +/* $OpenBSD: version.c,v 1.1 1997/07/14 08:14:30 downsj Exp $ */ /* * Record major changes in the boot code here, and increment the version @@ -9,6 +9,9 @@ * 2.0 INITIAL REVISION * * 2.1 APCI support, config changes from NetBSD. + * + * 2.2 Grand reorganization. + * */ -const char version[] = "2.1"; +const char version[] = "2.2"; diff --git a/sys/arch/hp300/stand/consdefs.h b/sys/arch/hp300/stand/include/consdefs.h index 1fc385cdadd..81b81c49ce0 100644 --- a/sys/arch/hp300/stand/consdefs.h +++ b/sys/arch/hp300/stand/include/consdefs.h @@ -1,4 +1,4 @@ -/* $OpenBSD: consdefs.h,v 1.3 1997/07/13 07:21:46 downsj Exp $ */ +/* $OpenBSD: consdefs.h,v 1.1 1997/07/14 08:14:31 downsj Exp $ */ /* $NetBSD: consdefs.h,v 1.2 1997/05/12 07:45:41 thorpej Exp $ */ /* diff --git a/sys/arch/hp300/stand/device.h b/sys/arch/hp300/stand/include/device.h index da930564b70..5c25cf01907 100644 --- a/sys/arch/hp300/stand/device.h +++ b/sys/arch/hp300/stand/include/device.h @@ -1,4 +1,4 @@ -/* $OpenBSD: device.h,v 1.1 1997/02/03 04:48:03 downsj Exp $ */ +/* $OpenBSD: device.h,v 1.1 1997/07/14 08:14:32 downsj Exp $ */ /* $NetBSD: device.h,v 1.1 1997/01/30 10:31:44 thorpej Exp $ */ /* diff --git a/sys/arch/hp300/stand/hpibvar.h b/sys/arch/hp300/stand/include/hpibvar.h index 7e5ca407c2a..da178c0bb4e 100644 --- a/sys/arch/hp300/stand/hpibvar.h +++ b/sys/arch/hp300/stand/include/hpibvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: hpibvar.h,v 1.2 1997/01/17 08:32:45 downsj Exp $ */ +/* $OpenBSD: hpibvar.h,v 1.1 1997/07/14 08:14:33 downsj Exp $ */ /* $NetBSD: hpibvar.h,v 1.4 1994/10/26 07:27:24 cgd Exp $ */ /* diff --git a/sys/arch/hp300/stand/if_lereg.h b/sys/arch/hp300/stand/include/if_lereg.h index 6cb23edf1a2..701c8d707f4 100644 --- a/sys/arch/hp300/stand/if_lereg.h +++ b/sys/arch/hp300/stand/include/if_lereg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_lereg.h,v 1.2 1997/01/17 08:32:47 downsj Exp $ */ +/* $OpenBSD: if_lereg.h,v 1.1 1997/07/14 08:14:34 downsj Exp $ */ /* $NetBSD: if_lereg.h,v 1.1 1996/01/01 18:10:56 thorpej Exp $ */ /* diff --git a/sys/arch/hp300/stand/itevar.h b/sys/arch/hp300/stand/include/itevar.h index a557fb46824..7bf9c8abe52 100644 --- a/sys/arch/hp300/stand/itevar.h +++ b/sys/arch/hp300/stand/include/itevar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: itevar.h,v 1.3 1997/01/17 08:32:52 downsj Exp $ */ +/* $OpenBSD: itevar.h,v 1.1 1997/07/14 08:14:35 downsj Exp $ */ /* $NetBSD: itevar.h,v 1.1 1996/03/03 04:23:42 thorpej Exp $ */ /* diff --git a/sys/arch/hp300/stand/kbdvar.h b/sys/arch/hp300/stand/include/kbdvar.h index 94c7e6d5ea7..c4a3b8e845f 100644 --- a/sys/arch/hp300/stand/kbdvar.h +++ b/sys/arch/hp300/stand/include/kbdvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: kbdvar.h,v 1.1 1997/04/16 11:56:39 downsj Exp $ */ +/* $OpenBSD: kbdvar.h,v 1.1 1997/07/14 08:14:36 downsj Exp $ */ /* $NetBSD: kbdvar.h,v 1.1 1997/04/14 19:00:13 thorpej Exp $ */ /*- diff --git a/sys/arch/hp300/stand/rominfo.h b/sys/arch/hp300/stand/include/rominfo.h index 969f10313a4..21f1351ffa5 100644 --- a/sys/arch/hp300/stand/rominfo.h +++ b/sys/arch/hp300/stand/include/rominfo.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rominfo.h,v 1.2 1997/01/17 08:32:57 downsj Exp $ */ +/* $OpenBSD: rominfo.h,v 1.1 1997/07/14 08:14:37 downsj Exp $ */ /* $NetBSD: rominfo.h,v 1.5 1994/10/26 07:27:53 cgd Exp $ */ /* diff --git a/sys/arch/hp300/stand/samachdep.h b/sys/arch/hp300/stand/include/samachdep.h index cc7c3882227..19522c79d1c 100644 --- a/sys/arch/hp300/stand/samachdep.h +++ b/sys/arch/hp300/stand/include/samachdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: samachdep.h,v 1.5 1997/07/13 09:43:32 downsj Exp $ */ +/* $OpenBSD: samachdep.h,v 1.1 1997/07/14 08:14:38 downsj Exp $ */ /* $NetBSD: samachdep.h,v 1.3 1997/05/12 07:54:45 thorpej Exp $ */ /* diff --git a/sys/arch/hp300/stand/scsivar.h b/sys/arch/hp300/stand/include/scsivar.h index 945c0b837a4..bd479cc298c 100644 --- a/sys/arch/hp300/stand/scsivar.h +++ b/sys/arch/hp300/stand/include/scsivar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: scsivar.h,v 1.2 1997/01/17 08:32:59 downsj Exp $ */ +/* $OpenBSD: scsivar.h,v 1.1 1997/07/14 08:14:39 downsj Exp $ */ /* $NetBSD: scsivar.h,v 1.4 1994/10/26 07:27:58 cgd Exp $ */ /* diff --git a/sys/arch/hp300/stand/volhdr.h b/sys/arch/hp300/stand/include/volhdr.h index edec02552ef..3f55ae44d0c 100644 --- a/sys/arch/hp300/stand/volhdr.h +++ b/sys/arch/hp300/stand/include/volhdr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: volhdr.h,v 1.2 1997/01/17 08:33:02 downsj Exp $ */ +/* $OpenBSD: volhdr.h,v 1.1 1997/07/14 08:14:40 downsj Exp $ */ /* $NetBSD: volhdr.h,v 1.4 1994/10/26 07:28:08 cgd Exp $ */ /* diff --git a/sys/arch/hp300/stand/installboot/Makefile b/sys/arch/hp300/stand/installboot/Makefile new file mode 100644 index 00000000000..d271daa3a0e --- /dev/null +++ b/sys/arch/hp300/stand/installboot/Makefile @@ -0,0 +1,10 @@ +# $OpenBSD: Makefile,v 1.1 1997/07/14 08:14:42 downsj Exp $ +# $NetBSD: Makefile,v 1.1 1997/02/04 03:52:59 thorpej Exp $ + +NOMAN= + +beforeinstall: + ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ + ${.CURDIR}/installboot.sh ${DESTDIR}${BINDIR}/installboot + +.include <bsd.prog.mk> diff --git a/sys/arch/hp300/stand/installboot.sh b/sys/arch/hp300/stand/installboot/installboot.sh index 1f18c8805f5..d3e5e39b3c1 100644 --- a/sys/arch/hp300/stand/installboot.sh +++ b/sys/arch/hp300/stand/installboot/installboot.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $OpenBSD: installboot.sh,v 1.2 1997/01/17 08:32:47 downsj Exp $ +# $OpenBSD: installboot.sh,v 1.1 1997/07/14 08:14:42 downsj Exp $ # $NetBSD: installboot.sh,v 1.2 1994/10/26 07:27:26 cgd Exp $ # compatibility with old installboot program diff --git a/sys/arch/hp300/stand/libkern/Makefile b/sys/arch/hp300/stand/libkern/Makefile index dea3881efe7..b42fddeefa0 100644 --- a/sys/arch/hp300/stand/libkern/Makefile +++ b/sys/arch/hp300/stand/libkern/Makefile @@ -1,18 +1,18 @@ -# $OpenBSD: Makefile,v 1.2 1997/01/18 03:18:18 downsj Exp $ +# $OpenBSD: Makefile,v 1.3 1997/07/14 08:14:44 downsj Exp $ LIB= kern .PATH: ${.CURDIR}/../../../../lib/libkern -.PATH: ${.CURDIR}/.. -CFLAGS+-Dhp300 =${DEBUGFLAGS} -CFLAGS+=-I${.CURDIR}/.. -CFLAGS+=-I${.CURDIR}/../../../.. -I${.CURDIR}/../../../../lib/libkern +CFLAGS= -O2 -msoft-float -I${.CURDIR}/../include \ + -I${.CURDIR}/../../../.. -I${.CURDIR}/../../../../lib/libkern # kern routines SRCS= __main.c ashrdi3.c divdi3.c qdivrem.c strlen.c strcat.c strcmp.c \ strcpy.c strncmp.c umoddi3.c +${OBJS}: ${.CURDIR}/../Makefile.inc + NOPROFILE= NOPIC= diff --git a/sys/arch/hp300/stand/libkern/Makefile.inc b/sys/arch/hp300/stand/libkern/Makefile.inc deleted file mode 100644 index dc36d1b2148..00000000000 --- a/sys/arch/hp300/stand/libkern/Makefile.inc +++ /dev/null @@ -1,31 +0,0 @@ -# $OpenBSD: Makefile.inc,v 1.2 1997/04/16 12:38:25 downsj Exp $ - -# NOTE: $S must correspond to the top of the 'sys' tree - -KERN_DIR= $S/arch/hp300/stand/libkern - -.if exists($(KERN_DIR)/${__objdir}) -KERN_LIBDIR= $(KERN_DIR)/${__objdir} -.else -KERN_LIBDIR= $(KERN_DIR) -.endif - -KERN_LIB= $(KERN_LIBDIR)/libkern.a - -$(KERN_LIB): .NOTMAIN __always_make_kern_lib - @echo making sure the kernel library is up to date... - @(cd $(KERN_DIR) ; make) - -clean:: .NOTMAIN __always_make_kern_lib - @echo cleaning the kernel library objects - @(cd $(KERN_DIR) ; make clean) - -cleandir: .NOTMAIN __always_make_kern_lib - @echo cleandiring the kernel library objects - @(cd $(KERN_DIR) ; make cleandir) - -depend:: .NOTMAIN __always_make_kern_lib - @echo depending the kernel library objects - @(cd $(KERN_DIR) ; make depend) - -__always_make_kern_lib: .NOTMAIN diff --git a/sys/arch/hp300/stand/libsa/Makefile b/sys/arch/hp300/stand/libsa/Makefile index 865b582138b..191d11fd68d 100644 --- a/sys/arch/hp300/stand/libsa/Makefile +++ b/sys/arch/hp300/stand/libsa/Makefile @@ -1,23 +1,16 @@ -# $OpenBSD: Makefile,v 1.9 1997/07/13 07:21:55 downsj Exp $ -# $NetBSD: Makefile,v 1.5 1996/06/26 17:44:42 thorpej Exp $ +# $OpenBSD: Makefile,v 1.10 1997/07/14 08:14:46 downsj Exp $ LIB= sa .PATH: ${.CURDIR}/../../../../lib/libsa -.PATH: ${.CURDIR}/.. -# Don't need these now... -# DEBUGFLAGS=-DNETIF_DEBUG -DRPC_DEBUG -DNFS_DEBUG -DRARP_DEBUG -DNET_DEBUG -# DEBUGFLAGS+=-DEXEC_DEBUG - -CFLAGS+=-Dhp300 -DSTANDALONE -DCOMPAT_UFS -DNO_LSEEK -CFLAGS+=-D__INTERNAL_LIBSA_CREAD -DHEAP_LIMIT="0xffffdfff" -CFLAGS+=${DEBUGFLAGS} -I${.CURDIR}/.. -CFLAGS+=-I${.CURDIR}/../.. -I${.CURDIR}/../../.. -CFLAGS+=-I${.CURDIR}/../../../.. -I${.CURDIR}/../../../../lib/libsa +CFLAGS= -O2 -msoft-float -D__INTERNAL_LIBSA_CREAD \ + -I${.CURDIR} -I${.CURDIR}/../include -I${.CURDIR}/../.. \ + -I${.CURDIR}/../../.. -I${.CURDIR}/../../../.. \ + -I${.CURDIR}/../../../../lib/libsa # stand routines -SRCS= alloc.c exit.c exec.c getfile.c gets.c globals.c \ +SRCS= alloc.c devopen.c exit.c exec.c getfile.c gets.c globals.c \ memcmp.c memcpy.c memset.c printf.c strerror.c strncpy.c # io routines @@ -31,7 +24,9 @@ SRCS+= arp.c ether.c in_cksum.c net.c netif.c rpc.c SRCS+= bootp.c bootparam.c rarp.c # boot filesystems -SRCS+= ufs.c nfs.c rawfs.o +SRCS+= ufs.c nfs.c rawfs.c + +${OBJS}: ${.CURDIR}/../Makefile.inc NOPROFILE= NOPIC= diff --git a/sys/arch/hp300/stand/libsa/Makefile.inc b/sys/arch/hp300/stand/libsa/Makefile.inc deleted file mode 100644 index e66c30783d1..00000000000 --- a/sys/arch/hp300/stand/libsa/Makefile.inc +++ /dev/null @@ -1,32 +0,0 @@ -# $OpenBSD: Makefile.inc,v 1.3 1997/04/16 12:38:26 downsj Exp $ -# $NetBSD: Makefile.inc,v 1.1 1995/08/04 07:55:50 thorpej Exp $ - -# NOTE: $S must correspond to the top of the 'sys' tree - -SA_DIR= $S/arch/hp300/stand/libsa - -.if exists($(SA_DIR)/${__objdir}) -SA_LIBDIR= $(SA_DIR)/${__objdir} -.else -SA_LIBDIR= $(SA_DIR) -.endif - -SA_LIB= $(SA_LIBDIR)/libsa.a - -$(SA_LIB): .NOTMAIN __always_make_sa_lib - @echo making sure the stand-alone library is up to date... - @(cd $(SA_DIR) ; make) - -clean:: .NOTMAIN __always_make_sa_lib - @echo cleaning the stand-alone library objects - @(cd $(SA_DIR) ; make clean) - -cleandir: .NOTMAIN __always_make_sa_lib - @echo cleandiring the stand-alone library objects - @(cd $(SA_DIR) ; make cleandir) - -depend:: .NOTMAIN __always_make_sa_lib - @echo depending the stand-alone library objects - @(cd $(SA_DIR) ; make depend) - -__always_make_sa_lib: .NOTMAIN diff --git a/sys/arch/hp300/stand/devopen.c b/sys/arch/hp300/stand/libsa/devopen.c index e0b406c2397..80453c8d1a6 100644 --- a/sys/arch/hp300/stand/devopen.c +++ b/sys/arch/hp300/stand/libsa/devopen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: devopen.c,v 1.4 1997/07/13 07:21:47 downsj Exp $ */ +/* $OpenBSD: devopen.c,v 1.1 1997/07/14 08:14:48 downsj Exp $ */ /* $NetBSD: devopen.c,v 1.7 1996/10/14 07:31:47 thorpej Exp $ */ /*- @@ -35,7 +35,7 @@ #include <lib/libsa/stand.h> -#include <hp300/stand/samachdep.h> +#include "samachdep.h" u_int opendev; diff --git a/sys/arch/hp300/stand/rawfs.c b/sys/arch/hp300/stand/libsa/rawfs.c index 1cde8d63d34..275fef8a686 100644 --- a/sys/arch/hp300/stand/rawfs.c +++ b/sys/arch/hp300/stand/libsa/rawfs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rawfs.c,v 1.2 1997/07/13 07:21:51 downsj Exp $ */ +/* $OpenBSD: rawfs.c,v 1.1 1997/07/14 08:14:48 downsj Exp $ */ /* $NetBSD: rawfs.c,v 1.2 1996/10/06 19:07:53 thorpej Exp $ */ /* @@ -42,7 +42,7 @@ #include <sys/param.h> #include <lib/libsa/stand.h> -#include <hp300/stand/rawfs.h> +#include "rawfs.h" extern int debug; diff --git a/sys/arch/hp300/stand/rawfs.h b/sys/arch/hp300/stand/libsa/rawfs.h index f5f2f2b1e20..c37ed16fb93 100644 --- a/sys/arch/hp300/stand/rawfs.h +++ b/sys/arch/hp300/stand/libsa/rawfs.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rawfs.h,v 1.1 1997/01/17 08:36:52 downsj Exp $ */ +/* $OpenBSD: rawfs.h,v 1.1 1997/07/14 08:14:49 downsj Exp $ */ /* $NetBSD: rawfs.h,v 1.1 1996/06/26 17:44:36 thorpej Exp $ */ /* diff --git a/sys/arch/hp300/stand/libz/Makefile b/sys/arch/hp300/stand/libz/Makefile new file mode 100644 index 00000000000..07228eb7e2d --- /dev/null +++ b/sys/arch/hp300/stand/libz/Makefile @@ -0,0 +1,19 @@ +# $OpenBSD: Makefile,v 1.1 1997/07/14 08:14:51 downsj Exp $ + +LIB= z + +.PATH: ${.CURDIR}/../../../../lib/libz + +CFLAGS= -O2 -msoft-float -D_ZLIB_PRIVATE -I${.CURDIR}/../../../../lib/libz + +SRCS= adler32.c crc32.c infblock.c infcodes.c inffast.c \ + inflate.c inftrees.c infutil.c + +${OBJS}: ${.CURDIR}/../Makefile.inc + +install: + +NOPIC= +NOPROFILE= + +.include <bsd.lib.mk> diff --git a/sys/arch/hp300/stand/mkboot/Makefile b/sys/arch/hp300/stand/mkboot/Makefile new file mode 100644 index 00000000000..3100a942d48 --- /dev/null +++ b/sys/arch/hp300/stand/mkboot/Makefile @@ -0,0 +1,13 @@ +# $OpenBSD: Makefile,v 1.1 1997/07/14 08:14:52 downsj Exp $ +# $NetBSD: Makefile,v 1.2 1997/05/14 07:57:13 thorpej Exp $ + +PROG= mkboot +NOMAN= + +CFLAGS+= -I${.CURDIR}/../include + +${OBJS}: ${.CURDIR}/../Makefile.inc + +install: + +.include <bsd.prog.mk> diff --git a/sys/arch/hp300/stand/mkboot.c b/sys/arch/hp300/stand/mkboot/mkboot.c index 90db7714824..7d664e15841 100644 --- a/sys/arch/hp300/stand/mkboot.c +++ b/sys/arch/hp300/stand/mkboot/mkboot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mkboot.c,v 1.3 1997/07/13 07:21:50 downsj Exp $ */ +/* $OpenBSD: mkboot.c,v 1.1 1997/07/14 08:14:53 downsj Exp $ */ /* * Copyright (c) 1990, 1993 @@ -42,18 +42,18 @@ static char copyright[] = #endif /* not lint */ #ifndef lint -#ifdef notdef +#if 0 static char sccsid[] = "@(#)mkboot.c 7.2 (Berkeley) 12/16/90"; static char rcsid[] = "$NetBSD: mkboot.c,v 1.5 1994/10/26 07:27:45 cgd Exp $"; #endif -static char rcsid[] = "$OpenBSD: mkboot.c,v 1.3 1997/07/13 07:21:50 downsj Exp $"; +static char rcsid[] = "$OpenBSD: mkboot.c,v 1.1 1997/07/14 08:14:53 downsj Exp $"; #endif /* not lint */ #include <sys/param.h> #include <sys/file.h> #include <a.out.h> -#include <hp300/stand/volhdr.h> +#include "volhdr.h" #include <stdio.h> #include <ctype.h> diff --git a/sys/arch/hp300/stand/srt0.s b/sys/arch/hp300/stand/srt0.s deleted file mode 100644 index 894a0d44ce3..00000000000 --- a/sys/arch/hp300/stand/srt0.s +++ /dev/null @@ -1,325 +0,0 @@ -/* $OpenBSD: srt0.s,v 1.5 1997/07/13 09:43:32 downsj Exp $ */ -/* $NetBSD: srt0.s,v 1.2 1997/03/10 08:00:47 thorpej Exp $ */ - -/* - * Copyright (c) 1988 University of Utah. - * Copyright (c) 1982, 1990, 1993 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * the Systems Programming Group of the University of Utah Computer - * Science Department. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * from: Utah $Hdr: srt0.c 1.18 92/12/21$ - * - * @(#)srt0.c 8.1 (Berkeley) 6/10/93 - */ - -/* - * Startup code for standalone system - */ - - .globl begin - .globl _end - .globl _edata - .globl _main - .globl _configure - .globl __rtt - .globl _bootdev,_howto,_lowram,_machineid - .globl _internalhpib,_mmuid - - STACK = 0xfffff000 | below the ROM page - BOOTTYPE = 0xfffffdc0 - LOWRAM = 0xfffffdce - SYSFLAG = 0xfffffed2 | system flags - MSUS = 0xfffffedc | MSUS (?) structure - VECTORS = 0xfffffee0 | beginning of jump vectors - NMIRESET = 0xffffff9c | reset vector - BUSERR = 0xfffffffc - MAXADDR = 0xfffff000 - NBPG = 4096 - MMUCMD = 0x005f400c | MMU command/status register - - .data -_bootdev: - .long 0 -_howto: - .long 0 -_lowram: - .long 0 -_machineid: - .long 0 -_mmuid: - .long 0 - - .text -begin: - movl #STACK,sp - moveq #47,d0 | # of vectors - 1 - movl #VECTORS+2,a0 | addr part of first vector -vecloop: - movl #trap,a0@ | make it direct to trap - addql #6,a0 | move to next vector addr - dbf d0,vecloop | go til done - movl #NMIRESET,a0 | NMI keyboard reset addr - movl #nmi,a0@ | catch in reset routine - -/* - * Determine our CPU type and look for internal HP-IB - */ - - lea _machineid,a0 - movl #0x808,d0 - movc d0,cacr | clear and disable on-chip cache(s) - movl #0x200,d0 | data freeze bit - movc d0,cacr | only exists on 68030 - movc cacr,d0 | read it back - tstl d0 | zero? - jeq not68030 | yes, we have 68020/68040 - - movl #0x808,d0 - movc d0,cacr | clear data freeze bit again - - /* - * 68030 models - */ - - movl #0x80,MMUCMD | set magic cookie - movl MMUCMD,d0 | read it back - btst #7,d0 | cookie still on? - jeq not370 | no, 360 or 375 - movl #4,a0@ | consider a 370 for now - movl #0,MMUCMD | clear magic cookie - movl MMUCMD,d0 | read it back - btst #7,d0 | still on? - jeq ihpibcheck | no, a 370 - movl #5,a0@ | yes, must be a 340 - jra ihpibcheck - -not370: - movl #3,a0@ | type is at least a 360 - movl #0,MMUCMD | clear magic cookie2 - movl MMUCMD,d0 | read it back - btst #16,d0 | still on? - jeq ihpibcheck | no, a 360 - lsrl #8,d0 | save MMU ID - andl #0xff,d0 - movl d0,_mmuid | save mmuid - cmpb #1,d0 | are we a 345? - jeq isa345 - cmpb #3,d0 | how about a 375? - jeq isa375 - movl #8,a0@ | must be a 400 - jra ihpibcheck -isa345: - movl #6,a0@ - jra ihpibcheck -isa375: - movl #7,a0@ - jra ihpibcheck - - /* - * End of 68030 section - */ - -not68030: - bset #31,d0 | data cache enable bit - movc d0,cacr | only exists on 68040 - movc cacr,d0 | read it back - tstl d0 | zero? - beq is68020 | yes, we have 68020 - moveq #0,d0 | now turn it back off - movec d0,cacr | before we access any data - - .long 0x4e7b0004 | movc d0,itt0 - .long 0x4e7b0005 | movc d0,itt1 - .long 0x4e7b0006 | movc d0,dtt0 - .long 0x4e7b0007 | movc d0,dtt1 - .word 0xf4d8 | cinva bc - - /* - * 68040 models - */ - - movl MMUCMD,d0 | get MMU register - lsrl #8,d0 - andl #0xff,d0 - movl d0,_mmuid | save mmuid - cmpb #5,d0 | are we a 425t? - jeq isa425 - cmpb #7,d0 | how about 425s? - jeq isa425 - cmpb #4,d0 | or a 433t? - jeq isa433 - cmpb #6,d0 | last chance... - jeq isa433 - movl #9,a0@ | guess we're a 380 - jra ihpibcheck -isa425: - movl #10,a0@ - jra ihpibcheck -isa433: - movl #11,a0@ - jra ihpibcheck - - /* - * End 68040 section - */ - - /* - * 68020 models - */ - -is68020: - movl #1,a0@ | consider a 330 for now - movl #1,MMUCMD | a 68020, write HP MMU location - movl MMUCMD,d0 | read it back - btst #0,d0 | zero? - jeq ihpibcheck | yes, a 330 - movl #0,a0@ | no, consider a 320 for now - movl #0x80,MMUCMD | set magic cookie - movl MMUCMD,d0 | read it back - btst #7,d0 | cookie still on? - jeq ihpibcheck | no, just a 320 - movl #2,a0@ | yes, a 350 - - /* - * End 68020 section - */ - -ihpibcheck: - movl #0,MMUCMD | make sure MMU is off - btst #5,SYSFLAG | do we have an internal HP-IB? - jeq boottype | yes, continue - clrl _internalhpib | no, clear the internal address -/* - * If this is a reboot, extract howto/bootdev stored by kernel - */ -boottype: - cmpw #12,BOOTTYPE | is this a reboot (REQ_REBOOT)? - jne notreboot | no, skip - lea MAXADDR,a0 | find last page - movl a0@+,d7 | and extract howto, bootdev - movl a0@+,d6 | from where doboot() left them - jra boot1 -/* - * At this point we do not know which logical device the MSUS select - * code refers to so we cannot construct bootdev. So we just punt - * and let configure() construct it. - */ -notreboot: - moveq #0,d6 | make sure bootdev is invalid - cmpw #18,BOOTTYPE | does the user want to interact? - jeq askme | yes, go to it - moveq #0,d7 | default to RB_AUTOBOOT - jra boot1 -askme: - moveq #3,d7 | default to RB_SINGLE|RB_ASKNAME -boot1: - movl d6,_bootdev | save bootdev and howto - movl d7,_howto | globally so all can access - movl LOWRAM,d0 | read lowram value from bootrom - /* - * Must preserve the scratch area for the BOOT ROM. - * Round up to the next 8k boundary. - */ - addl #((2*NBPG)-1),d0 - andl #-(2*NBPG),d0 - movl d0,_lowram | stash that value -start: - movl #_edata,a2 | start of BSS - movl #_end,a3 | end -clr: - clrb a2@+ | clear BSS - cmpl a2,a3 | done? - bne clr | no, keep going - jsr _configure | configure critical devices - jsr _main | lets go -__rtt: - movl #3,_howto | restarts get RB_SINGLE|RB_ASKNAME - jmp start - -/* - * probe a location and see if it causes a bus error - */ - .globl _badaddr -_badaddr: - movl BUSERR,__bsave | save ROM bus error handler address - movl sp,__ssave | and current stack pointer - movl #catchbad,BUSERR| plug in our handler - movl sp@(4),a0 | address to probe - movw a0@,d1 | do it - movl __bsave,BUSERR | if we got here, it did not fault - clrl d0 | return that this was not a bad addr - rts - -catchbad: - movl __bsave,BUSERR | got a bus error, so restore old handler - movl __ssave,sp | manually restore stack - moveq #1,d0 | indicate that we got a fault - rts | return to caller of badaddr() - -__bsave: - .long 0 -__ssave: - .long 0 - - .globl _trap -trap: - moveml #0xFFFF,sp@- | save registers - movl sp,sp@- | push pointer to frame - jsr _trap | call C routine to deal with it - tstl d0 - jeq Lstop - addql #4,sp - moveml sp@+,#0x7FFF - addql #8,sp - rte -Lstop: - stop #0x2700 | stop cold - -nmi: - movw #18,BOOTTYPE | mark as system switch - jsr _kbdnmi | clear the interrupt, and - | reset the system - stop #0 | SCREEEECH! - - .globl _call_req_reboot -_call_req_reboot: - jmp 0x1A4 | call ROM reboot function - rts | XXX: just in case? - - .globl _romout -_romout: - movl sp@(4),d0 | line number - movl sp@(8),a0 | string - jsr 0x150 | do it - rts diff --git a/sys/arch/hp300/stand/uboot/Makefile b/sys/arch/hp300/stand/uboot/Makefile new file mode 100644 index 00000000000..1f7afacb273 --- /dev/null +++ b/sys/arch/hp300/stand/uboot/Makefile @@ -0,0 +1,51 @@ +# $OpenBSD: Makefile,v 1.1 1997/07/14 08:14:54 downsj Exp $ + +PROG= uboot + +NOMAN= + +CFLAGS= -O3 -msoft-float -I${.CURDIR}/../include \ + -I${.CURDIR}/../libsa -I${.CURDIR}/../.. -I${.CURDIR}/../../.. \ + -I${.CURDIR}/../../../.. + +AFLAGS= -x assembler-with-cpp -traditional-cpp -I${.CURDIR}/../include \ + -I${.CURDIR}/../libsa -I${.CURDIR}/../.. -I${.CURDIR}/../../.. \ + -I${.CURDIR}/../../../.. + +SRCS= srt0.S uboot.c tgets.c netio.c clock.c conf.c + +LIBS= ${LIBCOMMON} ${LIBSA} ${LIBZ} ${LIBKERN} + +${OBJS}: ${.CURDIR}/../Makefile.inc + +CLEANFILES+= uboot.lif + +uboot.lif: uboot + ${MKBOOT_PROG} uboot $@ + +uboot: ${OBJS} ${LIBS} + ${LD} -N -T ${RELOC} -e begin ${OBJS} ${LIBS} -o $@ + @size $@ + @echo $@ total size should not exceed 1044480 bytes + +install: uboot.lif ${MKBOOT_PROG} + ${INSTALL} -d -m 755 -o ${BINOWN} -g ${BINGRP} \ + ${DESTDIR}/usr/mdec/rbootd + ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 uboot.lif \ + ${DESTDIR}/usr/mdec + rm -f ${DESTDIR}/usr/mdec/hdboot + ln ${DESTDIR}/usr/mdec/uboot.lif ${DESTDIR}/usr/mdec/hdboot + rm -f ${DESTDIR}/usr/mdec/boothd + ln ${DESTDIR}/usr/mdec/uboot.lif ${DESTDIR}/usr/mdec/boothd + rm -f ${DESTDIR}/usr/mdec/sdboot + ln ${DESTDIR}/usr/mdec/uboot.lif ${DESTDIR}/usr/mdec/sdboot + rm -f ${DESTDIR}/usr/mdec/bootsd + ln ${DESTDIR}/usr/mdec/uboot.lif ${DESTDIR}/usr/mdec/bootsd + rm -f ${DESTDIR}/usr/mdec/ctboot + ln ${DESTDIR}/usr/mdec/uboot.lif ${DESTDIR}/usr/mdec/ctboot + rm -f ${DESTDIR}/usr/mdec/bootct + ln ${DESTDIR}/usr/mdec/uboot.lif ${DESTDIR}/usr/mdec/bootct + rm -f ${DESTDIR}/usr/mdec/rbootd/SYS_UBOOT + ln ${DESTDIR}/usr/mdec/uboot.lif ${DESTDIR}/usr/mdec/rbootd/SYS_UBOOT + +.include <bsd.prog.mk> diff --git a/sys/arch/hp300/stand/clock.c b/sys/arch/hp300/stand/uboot/clock.c index 2be64952c9b..d635aaf2b65 100644 --- a/sys/arch/hp300/stand/clock.c +++ b/sys/arch/hp300/stand/uboot/clock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clock.c,v 1.3 1997/07/13 07:21:44 downsj Exp $ */ +/* $OpenBSD: clock.c,v 1.1 1997/07/14 08:14:55 downsj Exp $ */ /* $NetBSD: clock.c,v 1.3 1995/02/20 00:12:09 mycroft Exp $ */ /* @@ -45,7 +45,7 @@ #include <sys/param.h> -#include <hp300/stand/samachdep.h> +#include "samachdep.h" #include <hp300/dev/hilreg.h> #include <hp300/hp300/clockreg.h> diff --git a/sys/arch/hp300/stand/conf.c b/sys/arch/hp300/stand/uboot/conf.c index e34b4351e51..6ceb71fe0a3 100644 --- a/sys/arch/hp300/stand/conf.c +++ b/sys/arch/hp300/stand/uboot/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.4 1997/07/13 07:21:45 downsj Exp $ */ +/* $OpenBSD: conf.c,v 1.1 1997/07/14 08:14:56 downsj Exp $ */ /* $NetBSD: conf.c,v 1.12 1996/10/14 07:29:15 thorpej Exp $ */ /* @@ -40,7 +40,7 @@ #include <lib/libsa/stand.h> -#include <hp300/stand/samachdep.h> +#include "samachdep.h" #include <sys/socket.h> #include <net/if.h> @@ -49,8 +49,8 @@ #include <netinet/in_systm.h> #include <lib/libsa/nfs.h> -#include <hp300/stand/rawfs.h> #include <lib/libsa/ufs.h> +#include "rawfs.h" int debug = 0; /* XXX */ diff --git a/sys/arch/hp300/stand/netio.c b/sys/arch/hp300/stand/uboot/netio.c index cb7639efae8..d74e39570cf 100644 --- a/sys/arch/hp300/stand/netio.c +++ b/sys/arch/hp300/stand/uboot/netio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: netio.c,v 1.4 1997/07/13 07:21:51 downsj Exp $ */ +/* $OpenBSD: netio.c,v 1.1 1997/07/14 08:14:57 downsj Exp $ */ /* $NetBSD: netio.c,v 1.5 1997/01/30 10:32:56 thorpej Exp $ */ /* @@ -58,7 +58,9 @@ #include <netinet/in_systm.h> #include <lib/libsa/stand.h> -#include <hp300/stand/samachdep.h> + +#include "samachdep.h" + #include <lib/libsa/net.h> #include <lib/libsa/netif.h> #include <lib/libsa/bootparam.h> diff --git a/sys/arch/hp300/stand/uboot/srt0.S b/sys/arch/hp300/stand/uboot/srt0.S new file mode 100644 index 00000000000..77e0b752c26 --- /dev/null +++ b/sys/arch/hp300/stand/uboot/srt0.S @@ -0,0 +1,324 @@ +/* $OpenBSD: srt0.S,v 1.1 1997/07/14 08:14:58 downsj Exp $ */ +/* $NetBSD: srt0.S,v 1.4 1997/05/12 07:56:00 thorpej Exp $ */ + +/* + * Copyright (c) 1988 University of Utah. + * Copyright (c) 1982, 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * the Systems Programming Group of the University of Utah Computer + * Science Department. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * from: Utah $Hdr: srt0.c 1.18 92/12/21$ + * + * @(#)srt0.c 8.1 (Berkeley) 6/10/93 + */ + +/* + * Startup code for standalone system + */ + +/* For machineid and mmuid constants */ +#include <machine/hp300spu.h> + +/* For _C_LABEL() and friends. */ +#include <machine/asm.h> + + STACK = 0xfffff000 | below the ROM page + BOOTTYPE = 0xfffffdc0 + LOWRAM = 0xfffffdce + SYSFLAG = 0xfffffed2 | system flags + MSUS = 0xfffffedc | MSUS (?) structure + VECTORS = 0xfffffee0 | beginning of jump vectors + NMIRESET = 0xffffff9c | reset vector + BUSERR = 0xfffffffc + MAXADDR = 0xfffff000 + NBPG = 4096 + MMUCMD = 0x005f400c | MMU command/status register + + .data +GLOBAL(bootdev) + .long 0 + +GLOBAL(howto) + .long 0 + +GLOBAL(lowram) + .long 0 + +GLOBAL(machineid) + .long 0 + +GLOBAL(mmuid) + .long 0 + + .text +ASENTRY_NOPROFILE(begin) + movl #STACK,sp + moveq #47,d0 | # of vectors - 1 + movl #VECTORS+2,a0 | addr part of first vector +1: + movl #_ASM_LABEL(__trap),a0@ | make it direct to __trap + addql #6,a0 | move to next vector addr + dbf d0,1b | go til done + movl #NMIRESET,a0 | NMI keyboard reset addr + movl #nmi,a0@ | catch in reset routine + +/* + * Determine our SPU type and look for internal HP-IB + */ + lea _C_LABEL(machineid),a0 + movl #0x808,d0 + movc d0,cacr | clear and disable on-chip cache(s) + movl #0x200,d0 | data freeze bit + movc d0,cacr | only exists on 68030 + movc cacr,d0 | read it back + tstl d0 | zero? + jeq not68030 | yes, we have 68020/68040 + + movl #0x808,d0 + movc d0,cacr | clear data freeze bit again + + /* + * 68030 models + */ + + movl #0x80,MMUCMD | set magic cookie + movl MMUCMD,d0 | read it back + btst #7,d0 | cookie still on? + jeq not370 | no, 360 or 375 + movl #HP_370,a0@ | consider a 370 for now + movl #0,MMUCMD | clear magic cookie + movl MMUCMD,d0 | read it back + btst #7,d0 | still on? + jeq ihpibcheck | no, a 370 + movl #HP_340,a0@ | yes, must be a 340 + jra ihpibcheck + +not370: + movl #HP_360,a0@ | type is at least a 360 + movl #0,MMUCMD | clear magic cookie2 + movl MMUCMD,d0 | read it back + btst #16,d0 | still on? + jeq ihpibcheck | no, a 360 + lsrl #MMUID_SHIFT,d0 | save MMU ID + andl #MMUID_MASK,d0 + movl d0,_C_LABEL(mmuid) | save mmuid + cmpb #MMUID_345,d0 | are we a 345? + jeq isa345 + cmpb #MMUID_375,d0 | how about a 375? + jeq isa375 + movl #HP_400,a0@ | must be a 400 + jra ihpibcheck +isa345: + movl #HP_345,a0@ + jra ihpibcheck +isa375: + movl #HP_375,a0@ + jra ihpibcheck + + /* + * End of 68030 section + */ + +not68030: + bset #31,d0 | data cache enable bit + movc d0,cacr | only exists on 68040 + movc cacr,d0 | read it back + tstl d0 | zero? + beq is68020 | yes, we have 68020 + moveq #0,d0 | now turn it back off + movec d0,cacr | before we access any data + + .long 0x4e7b0004 | movc d0,itt0 + .long 0x4e7b0005 | movc d0,itt1 + .long 0x4e7b0006 | movc d0,dtt0 + .long 0x4e7b0007 | movc d0,dtt1 + .word 0xf4d8 | cinva bc + + /* + * 68040 models + */ + + movl MMUCMD,d0 | get MMU ID + lsrl #MMUID_SHIFT,d0 + andl #MMUID_MASK,d0 + movl d0,_C_LABEL(mmuid) | save mmuid + cmpb #MMUID_425_T,d0 | are we a 425t? + jeq isa425 + cmpb #MMUID_425_S,d0 | how about 425s? + jeq isa425 + cmpb #MMUID_433_T,d0 | or a 433t? + jeq isa433 + cmpb #MMUID_433_S,d0 | last chance... + jeq isa433 + movl #HP_380,a0@ | guess we're a 380 + jra ihpibcheck +isa425: + movl #HP_425,a0@ + jra ihpibcheck +isa433: + movl #HP_433,a0@ + jra ihpibcheck + + /* + * End 68040 section + */ + + /* + * 68020 models + */ + +is68020: + movl #HP_330,a0@ | consider a 330 for now + movl #1,MMUCMD | a 68020, write HP MMU location + movl MMUCMD,d0 | read it back + btst #0,d0 | zero? + jeq ihpibcheck | yes, a 330 + movl #HP_320,a0@ | no, consider a 320 for now + movl #0x80,MMUCMD | set magic cookie + movl MMUCMD,d0 | read it back + btst #7,d0 | cookie still on? + jeq ihpibcheck | no, just a 320 + movl #HP_350,a0@ | yes, a 350 + + /* + * End 68020 section + */ + +ihpibcheck: + movl #0,MMUCMD | make sure MMU is off + btst #5,SYSFLAG | do we have an internal HP-IB? + jeq boottype | yes, continue + clrl _C_LABEL(internalhpib) | no, clear the internal address +/* + * If this is a reboot, extract howto/bootdev stored by kernel + */ +boottype: + cmpw #12,BOOTTYPE | is this a reboot (REQ_REBOOT)? + jne notreboot | no, skip + lea MAXADDR,a0 | find last page + movl a0@+,d7 | and extract howto, bootdev + movl a0@+,d6 | from where doboot() left them + jra boot1 +/* + * At this point we do not know which logical device the MSUS select + * code refers to so we cannot construct bootdev. So we just punt + * and let configure() construct it. + */ +notreboot: + moveq #0,d6 | make sure bootdev is invalid + cmpw #18,BOOTTYPE | does the user want to interact? + jeq askme | yes, go to it + moveq #0,d7 | default to RB_AUTOBOOT + jra boot1 +askme: + moveq #3,d7 | default to RB_SINGLE|RB_ASKNAME +boot1: + movl d6,_C_LABEL(bootdev) | save bootdev and howto + movl d7,_C_LABEL(howto) | globally so all can access + movl LOWRAM,d0 | read lowram value from bootrom + /* + * Must preserve the scratch area for the BOOT ROM. + * Round up to the next 8k boundary. + */ + addl #((2*NBPG)-1),d0 + andl #-(2*NBPG),d0 + movl d0,_C_LABEL(lowram) | stash that value +start: + movl #_C_LABEL(edata),a2 | start of BSS + movl #_C_LABEL(end),a3 | end +1: + clrb a2@+ | clear BSS + cmpl a2,a3 | done? + bne 1b | no, keep going + jsr _C_LABEL(configure) | configure critical devices + jsr _C_LABEL(main) | lets go +GLOBAL(_rtt) + movl #3,_C_LABEL(howto) | restarts get RB_SINGLE|RB_ASKNAME + jmp start + +/* + * probe a location and see if it causes a bus error + */ +ENTRY_NOPROFILE(badaddr) + movl BUSERR,_C_LABEL(_bsave) | save ROM bus error handler address + movl sp,_C_LABEL(_ssave) | and current stack pointer + movl #catchbad,BUSERR | plug in our handler + movl sp@(4),a0 | address to probe + movw a0@,d1 | do it + movl _C_LABEL(_bsave),BUSERR | if we got here, it did not fault + clrl d0 | return that this was not a bad addr + rts + +catchbad: + movl _C_LABEL(_bsave),BUSERR | got a bus error, so restore + | old handler + movl _C_LABEL(_ssave),sp | manually restore stack + moveq #1,d0 | indicate that we got a fault + rts | return to caller of badaddr() + + .data +GLOBAL(_bsave) + .long 0 + +GLOBAL(_ssave) + .long 0 + +ASENTRY_NOPROFILE(__trap) + moveml #0xFFFF,sp@- | save registers + movl sp,sp@- | push pointer to frame + jsr _C_LABEL(trap) | call C routine to deal with it + tstl d0 + jeq Lstop + addql #4,sp + moveml sp@+,#0x7FFF + addql #8,sp + rte +Lstop: + stop #0x2700 | stop cold + +ASENTRY_NOPROFILE(nmi) + movw #18,BOOTTYPE | mark as system switch + jsr _C_LABEL(kbdnmi) | clear the interrupt, and + | reset the system + stop #0 | SCREEEECH! + +ENTRY_NOPROFILE(call_req_reboot) + jmp 0x1A4 | call ROM reboot function + rts | XXX: just in case? + +ENTRY_NOPROFILE(romout) + movl sp@(4),d0 | line number + movl sp@(8),a0 | string + jsr 0x150 | do it + rts diff --git a/sys/arch/hp300/stand/tgets.c b/sys/arch/hp300/stand/uboot/tgets.c index 898d3efe607..47efe066bde 100644 --- a/sys/arch/hp300/stand/tgets.c +++ b/sys/arch/hp300/stand/uboot/tgets.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tgets.c,v 1.2 1997/01/17 08:33:01 downsj Exp $ */ +/* $OpenBSD: tgets.c,v 1.1 1997/07/14 08:14:59 downsj Exp $ */ /* $NetBSD: tgets.c,v 1.4 1994/10/26 07:28:05 cgd Exp $ */ /*- diff --git a/sys/arch/hp300/stand/uboot.c b/sys/arch/hp300/stand/uboot/uboot.c index e7c60a1be6c..5ea91f31bfd 100644 --- a/sys/arch/hp300/stand/uboot.c +++ b/sys/arch/hp300/stand/uboot/uboot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uboot.c,v 1.8 1997/07/13 07:21:54 downsj Exp $ */ +/* $OpenBSD: uboot.c,v 1.1 1997/07/14 08:15:00 downsj Exp $ */ /* $NetBSD: uboot.c,v 1.3 1997/04/27 21:17:13 thorpej Exp $ */ /*- @@ -43,7 +43,7 @@ #include <lib/libsa/stand.h> -#include <hp300/stand/samachdep.h> +#include "samachdep.h" /* * Boot program... bits in `howto' determine whether boot stops to |