From: weingart Date: Fri, 11 Apr 1997 19:07:07 +0000 (+0000) Subject: Works with .gz kernels now X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=0096680e5267ac4947cc9893761c8b3f6814a70a;p=openbsd Works with .gz kernels now --- diff --git a/sys/arch/i386/stand/Makefile.inc b/sys/arch/i386/stand/Makefile.inc index c9c7d202f1b..d94df93ebd7 100644 --- a/sys/arch/i386/stand/Makefile.inc +++ b/sys/arch/i386/stand/Makefile.inc @@ -1,11 +1,11 @@ -# $OpenBSD: Makefile.inc,v 1.5 1997/04/05 18:56:14 mickey Exp $ +# $OpenBSD: Makefile.inc,v 1.6 1997/04/11 19:07:07 weingart Exp $ #CPPFLAGS+=-nostdinc -I/sys CPPFLAGS+=-Wall -Werror -I. -Imachine SACFLAGS+=-Wa,-R -fno-common -fpack-struct -fno-builtin -fomit-frame-pointer CPPFLAGS+=-D_STANDALONE -CPPFLAGS+=-DSAVE_MEMORY -CPPFLAGS+=-DDEBUG +# CPPFLAGS+=-DSAVE_MEMORY /* XXX - Does *NOT* work */ +# CPPFLAGS+=-DDEBUG # CPPFLAGS+=-DBIOS_DEBUG # CPPFLAGS+=-DEXEC_DEBUG # CPPFLAGS+=-DALLOC_TRACE diff --git a/sys/arch/i386/stand/biosboot/biosboot.S b/sys/arch/i386/stand/biosboot/biosboot.S index d417da014f3..9beb090a717 100644 --- a/sys/arch/i386/stand/biosboot/biosboot.S +++ b/sys/arch/i386/stand/biosboot/biosboot.S @@ -1,4 +1,4 @@ -/* $OpenBSD: biosboot.S,v 1.3 1997/03/31 23:06:19 mickey Exp $ */ +/* $OpenBSD: biosboot.S,v 1.4 1997/04/11 19:09:59 weingart Exp $ */ .file "bootbios.S" @@ -11,11 +11,15 @@ #define addr32 .byte 0x67 #define data32 .byte 0x66 +/* Better use 32, 48 does not seem to compile */ +#define BLKCNT 32 +#if 0 #ifdef DEBUG #define BLKCNT 32 #else #define BLKCNT 48 #endif +#endif #define BOOTSEG 0x07c0 /* boot loaded here */ #define BOOTSTACK 0xfffc /* stack starts here */ diff --git a/sys/arch/i386/stand/boot/cmd.c b/sys/arch/i386/stand/boot/cmd.c index 07b9d251df0..ea26f0c0ba4 100644 --- a/sys/arch/i386/stand/boot/cmd.c +++ b/sys/arch/i386/stand/boot/cmd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd.c,v 1.5 1997/04/08 22:48:29 mickey Exp $ */ +/* $OpenBSD: cmd.c,v 1.6 1997/04/11 19:12:56 weingart Exp $ */ /* * Copyright (c) 1997 Michael Shalayeff @@ -339,6 +339,8 @@ execmd(cmd) version, #ifdef DEBUG (debug? "on": "off"), +#else + "not present", #endif cmd->bootdev, cmd->cwd, cmd->image, cmd->addr, cmd->timeout); diff --git a/sys/arch/i386/stand/boot/srt0.S b/sys/arch/i386/stand/boot/srt0.S index 7f79ba00950..88d8125c558 100644 --- a/sys/arch/i386/stand/boot/srt0.S +++ b/sys/arch/i386/stand/boot/srt0.S @@ -1,4 +1,4 @@ -/* $OpenBSD: srt0.S,v 1.5 1997/04/07 01:26:00 weingart Exp $ */ +/* $OpenBSD: srt0.S,v 1.6 1997/04/11 19:12:58 weingart Exp $ */ /* $NetBSD: srt0.c,v 1.3 1994/10/27 04:21:59 cgd Exp $ */ /*- @@ -105,6 +105,7 @@ __rtt: movw $0x1234, %ax movw %ax, 0x472 # warm boot + /* Try to use the KBD to reboot system */ movl $0xfe, %eax movl $0x64, %edx outb %al, %dx @@ -125,8 +126,16 @@ __rtt: movl $0xb8000, %ebx movl $0x07310731, (%ebx) #endif + + /* Try to cause a tripple fault... */ lidt _Idtr_reset + xorl %eax, %eax + divl %eax, %eax + + /* Again... */ int $0x8 + + /* Again... */ movl $0, %esp # segment violation ret diff --git a/sys/arch/i386/stand/libsa/exec_i386.c b/sys/arch/i386/stand/libsa/exec_i386.c index f829a22ca39..908a9ddfb61 100644 --- a/sys/arch/i386/stand/libsa/exec_i386.c +++ b/sys/arch/i386/stand/libsa/exec_i386.c @@ -1,5 +1,5 @@ -/* $OpenBSD: exec_i386.c,v 1.5 1997/04/09 08:39:36 mickey Exp $ */ +/* $OpenBSD: exec_i386.c,v 1.6 1997/04/11 19:14:18 weingart Exp $ */ #include #include @@ -7,19 +7,23 @@ #include #include + int startprog(void *, void *); static int bootdev; +#define round_to_size(x) (((int)(x) + sizeof(int) - 1) & ~(sizeof(int) - 1)) + + void machdep_start(startaddr, howto, loadaddr, ssym, esym) char *startaddr, *loadaddr, *ssym, *esym; int howto; { static int argv[9]; - struct exec *x; - #ifdef DEBUG + struct exec *x; + x = (void *)loadaddr; printf("exec {\n"); printf(" a_midmag = %lx\n", x->a_midmag); @@ -55,7 +59,7 @@ machdep_start(startaddr, howto, loadaddr, ssym, esym) argv[1] = howto; argv[2] = bootdev; argv[3] = (int)ssym; - argv[4] = (int)esym; + argv[4] = (int)round_to_size(esym); argv[5] = (int)startaddr; argv[6] = 0; argv[7] = cnvmem; diff --git a/sys/stand/boot/cmd.c b/sys/stand/boot/cmd.c index 07b9d251df0..ea26f0c0ba4 100644 --- a/sys/stand/boot/cmd.c +++ b/sys/stand/boot/cmd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd.c,v 1.5 1997/04/08 22:48:29 mickey Exp $ */ +/* $OpenBSD: cmd.c,v 1.6 1997/04/11 19:12:56 weingart Exp $ */ /* * Copyright (c) 1997 Michael Shalayeff @@ -339,6 +339,8 @@ execmd(cmd) version, #ifdef DEBUG (debug? "on": "off"), +#else + "not present", #endif cmd->bootdev, cmd->cwd, cmd->image, cmd->addr, cmd->timeout);