summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>1999-01-25 21:53:32 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>1999-01-25 21:53:32 +0000
commite7484c47a1f534710e32bd0b2d3236341f88d4c6 (patch)
treeade1e7bdc19b097e16793396b971874d3a476de9
parentb7f7bc1b5c07dfa816cdbf108d245715559ceae8 (diff)
call diskless kernel "bsd" so it would be loaded even we have
problems w/ kbd on PDC console device. remove neva-gonna-b-there stuff from conf.c some improvements to srt0.S code, use constants defined in machine/ files.
-rw-r--r--sys/arch/hppa/stand/boot/Makefile10
-rw-r--r--sys/arch/hppa/stand/boot/conf.c25
-rw-r--r--sys/arch/hppa/stand/boot/srt0.S50
3 files changed, 50 insertions, 35 deletions
diff --git a/sys/arch/hppa/stand/boot/Makefile b/sys/arch/hppa/stand/boot/Makefile
index 6a744f1a50f..24cb2db2b7f 100644
--- a/sys/arch/hppa/stand/boot/Makefile
+++ b/sys/arch/hppa/stand/boot/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.4 1998/09/29 07:14:52 mickey Exp $
+# $OpenBSD: Makefile,v 1.5 1999/01/25 21:53:31 mickey Exp $
PROG= boot
SRCS= srt0.S boot.c cmd.c vars.c bootarg.c conf.c
@@ -23,12 +23,14 @@ DPADD= ${LIBSA} ${LIBZ} ${LIBKERN}
all: boot.lif
.if exists(${.CURDIR}/../../compile/DISKLESS/bsd)
-diskless: ${.CURDIR}/../../compile/DISKLESS/bsd
- gzip -9c ${.CURDIR}/../../compile/DISKLESS/bsd > diskless
-ADDBOOT+=diskless
+bsd: ${.CURDIR}/../../compile/DISKLESS/bsd
+ gzip -9c ${.CURDIR}/../../compile/DISKLESS/bsd > bsd
+ADDBOOT+=bsd
.endif
+# probably we should check for 256k limit for ISL
boot.lif: ${PROG} ${ADDBOOT}
+ -@cp ${PROG} ${PROG}.gdb
${STRIP} ${PROG}
${MKBOOT} -v ${PROG} ${ADDBOOT} boot.lif
diff --git a/sys/arch/hppa/stand/boot/conf.c b/sys/arch/hppa/stand/boot/conf.c
index 379a3b516a3..60d217838f3 100644
--- a/sys/arch/hppa/stand/boot/conf.c
+++ b/sys/arch/hppa/stand/boot/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.5 1998/09/29 07:14:53 mickey Exp $ */
+/* $OpenBSD: conf.c,v 1.6 1999/01/25 21:53:31 mickey Exp $ */
/*
* Copyright (c) 1998 Michael Shalayeff
@@ -35,19 +35,15 @@
#include <machine/lifvar.h>
#include <lib/libsa/ufs.h>
#include <lib/libsa/cd9660.h>
-#ifdef notdef
-#include <lib/libsa/nfs.h>
-#include <lib/libsa/netif.h>
-#endif
#include <lib/libsa/exec.h>
#include <dev/cons.h>
-const char version[] = "0.03";
-int debug = 0;
+const char version[] = "0.04";
+int debug = 1;
const struct x_sw execsw[] = {
- { "elf", elf_probe, elf_load },
-/* { "som", som_probe, som_load }, */
+ { "elf", elf_probe, elf_load, elf_ldsym },
+/* { "som", som_probe, som_load, som_ldsym }, */
{ "" , NULL, NULL },
};
@@ -56,22 +52,11 @@ struct fs_ops file_system[] = {
lif_stat, lif_readdir },
{ ufs_open, ufs_close, ufs_read, ufs_write, ufs_seek,
ufs_stat, ufs_readdir },
-#ifdef notdef
- { nfs_open, nfs_close, nfs_read, nfs_write, nfs_seek,
- nfs_stat, nfs_readdir },
-#endif
{ cd9660_open, cd9660_close, cd9660_read, cd9660_write, cd9660_seek,
cd9660_stat, cd9660_readdir },
};
int nfsys = NENTS(file_system);
-#ifdef notdef
-struct netif_driver *netif_drivers[] = {
- NULL
-};
-int n_netif_drivers = NENTS(netif_drivers);
-#endif
-
struct devsw devsw[] = {
{ "ct", iodcstrategy, ctopen, ctclose, noioctl },
{ "sd", iodcstrategy, dkopen, dkclose, noioctl },
diff --git a/sys/arch/hppa/stand/boot/srt0.S b/sys/arch/hppa/stand/boot/srt0.S
index a374eafd9d5..a42298f99f4 100644
--- a/sys/arch/hppa/stand/boot/srt0.S
+++ b/sys/arch/hppa/stand/boot/srt0.S
@@ -1,6 +1,35 @@
-/* $OpenBSD: srt0.S,v 1.3 1998/08/29 01:54:25 mickey Exp $ */
+/* $OpenBSD: srt0.S,v 1.4 1999/01/25 21:53:31 mickey Exp $ */
/*
+ * Copyright (c) 1998 Michael Shalayeff
+ * All rights reserved.
+ *
+ * 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 Michael Shalayeff.
+ * 4. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+/*
* Copyright 1996 1995 by Open Software Foundation, Inc.
* All Rights Reserved
*
@@ -36,12 +65,12 @@
#define _LOCORE
#include <machine/iomod.h>
-
#include <machine/asm.h>
/*
+ * This is the ending of the begin
*/
- ENTRY(begin)
+ENTRY(begin)
blr %r0,%r5 ; Get address of 'boff' into 'r5',
ldo begin-boff(%r5),%r5 ; and subtract to get 'begin'.
@@ -60,7 +89,7 @@ copyloop ; do
stwm %r1,4(%r4)
; here we zero the .bss
- ldil L%end, %r3 ; the end af all
+ ldil L%end, %r3 ; the end of all
ldil L%__bss_start, %r4 ; .bss is here
sub %r3,%r4,%r3
zeroloop
@@ -100,31 +129,30 @@ loop addib,>,n -16,%r21,loop ; Decrement by cache line size (16).
nop
nop
nop
- EXIT(begin) /* jump to relocated code */
+EXIT(begin) /* jump to relocated code */
start
ldil L%stack_base,%sp
ldo R%stack_base(%sp),%sp
dep %r0,31,6,%sp ; and ensure maximum alignment.
+ b boot ; Call boot(),
copy %r0, arg0 ; use default boot device
- b,n boot ; Call boot(),
/*
* rtt - restart the box
*/
- ENTRY(_rtt)
- ldi CMD_RESET, %r26
+ENTRY(_rtt)
ldil L%LBCAST_ADDR, %r25
- stw %r26,R%48(%r25) ; iomod->io_command
+ ldi CMD_RESET, %r26
+ stw %r26,R%iomod_command(%r25)
forever ; Loop until bus reset takes effect.
b,n forever
ldo -48(sp),sp
- EXIT(_rtt)
+EXIT(_rtt)
.SPACE $PRIVATE$
-; .SUBSPA $GLOBAL$
.EXPORT $global$
$global$
.WORD 0