-# $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
-/* $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"
#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 */
-/* $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
version,
#ifdef DEBUG
(debug? "on": "off"),
+#else
+ "not present",
#endif
cmd->bootdev, cmd->cwd, cmd->image,
cmd->addr, cmd->timeout);
-/* $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 $ */
/*-
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
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
-/* $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 <sys/param.h>
#include <sys/exec.h>
#include <libsa.h>
#include <biosdev.h>
+
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);
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;
-/* $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
version,
#ifdef DEBUG
(debug? "on": "off"),
+#else
+ "not present",
#endif
cmd->bootdev, cmd->cwd, cmd->image,
cmd->addr, cmd->timeout);