summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/hppa/stand/libsa/exec_hppa.c33
1 files changed, 29 insertions, 4 deletions
diff --git a/sys/arch/hppa/stand/libsa/exec_hppa.c b/sys/arch/hppa/stand/libsa/exec_hppa.c
index b3666c3c954..0ae11cdd656 100644
--- a/sys/arch/hppa/stand/libsa/exec_hppa.c
+++ b/sys/arch/hppa/stand/libsa/exec_hppa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec_hppa.c,v 1.3 1998/07/13 03:52:11 mickey Exp $ */
+/* $OpenBSD: exec_hppa.c,v 1.4 1998/09/29 07:21:58 mickey Exp $ */
/*
* Copyright (c) 1998 Michael Shalayeff
@@ -42,9 +42,10 @@
#include "libsa.h"
#include <lib/libsa/exec.h>
-#define round_to_size(x) (((int)(x) + sizeof(int) - 1) & ~(sizeof(int) - 1))
+#include <machine/pdc.h>
+#include "dev_hppa.h"
-typedef void (*startfuncp) __P((int, int, caddr_t))
+typedef void (*startfuncp) __P((int, int, int, int, int, caddr_t))
__attribute__ ((noreturn));
void
@@ -53,13 +54,37 @@ machdep_exec(xp, howto, loadaddr)
int howto;
void *loadaddr;
{
+ extern int debug;
+#ifdef EXEC_DEBUG
+ register int i;
+#endif
size_t ac = BOOTARG_LEN;
caddr_t av = (caddr_t)BOOTARG_OFF;
+#ifdef notyet
makebootargs(av, &ac);
+#endif
fcacheall();
+#ifdef EXEC_DEBUG
+ if (debug) {
+ printf("ep=0x%x [", xp->xp_entry);
+ for (i = 0; i < 10240; i++) {
+ if (!(i % 8)) {
+ printf("\b\n%p:", &((u_int *)xp->xp_entry)[i]);
+ if (getchar() != ' ')
+ break;
+ }
+ printf("%x,", ((int *)xp->xp_entry)[i]);
+ }
+ printf("\b\b ]\n");
+ }
+#endif
+
+ __asm("mtctl %r0, %cr17");
+ __asm("mtctl %r0, %cr17");
/* stack and the gung is ok at this point, so, no need for asm setup */
- (*(startfuncp)(loadaddr + xp->xp_entry)) (BOOTARG_APIVER, ac, av);
+ (*(startfuncp)(xp->xp_entry)) ((int)pdc, howto, bootdev,
+ BOOTARG_APIVER, ac, av);
/* not reached */
}