summaryrefslogtreecommitdiff
path: root/sys/arch/i386/stand/libsa
diff options
context:
space:
mode:
authorTobias Weingartner <weingart@cvs.openbsd.org>1997-04-11 19:14:19 +0000
committerTobias Weingartner <weingart@cvs.openbsd.org>1997-04-11 19:14:19 +0000
commit3b5f0795759d42a1e1d724534c2642e440a8fb96 (patch)
tree5e0499c370055ff653c7e9714a6d553a1f823425 /sys/arch/i386/stand/libsa
parent87574036aa7b8287114b589975f6706859abbcff (diff)
Works with .gz kernels now
Diffstat (limited to 'sys/arch/i386/stand/libsa')
-rw-r--r--sys/arch/i386/stand/libsa/exec_i386.c12
1 files changed, 8 insertions, 4 deletions
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 <sys/param.h>
#include <sys/exec.h>
@@ -7,19 +7,23 @@
#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);
@@ -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;