summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2002-09-11 15:55:59 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2002-09-11 15:55:59 +0000
commit1f3560cfef391387e4fbe5ec8bc8b96a9cee861c (patch)
tree445046ebc29c60e49f53a4a44a33a408939ed1f9
parent2b739e4041f36376d5799ec49af7c66768fb647e (diff)
stack grows the other way, but the frame is the other way to that. hehe
-rw-r--r--sys/arch/hppa/hppa/machdep.c8
-rw-r--r--sys/arch/hppa/hppa/vm_machdep.c9
2 files changed, 8 insertions, 9 deletions
diff --git a/sys/arch/hppa/hppa/machdep.c b/sys/arch/hppa/hppa/machdep.c
index c1f046e12a8..a37eb44f5b7 100644
--- a/sys/arch/hppa/hppa/machdep.c
+++ b/sys/arch/hppa/hppa/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.77 2002/09/09 18:33:42 mickey Exp $ */
+/* $OpenBSD: machdep.c,v 1.78 2002/09/11 15:55:58 mickey Exp $ */
/*
* Copyright (c) 1999-2002 Michael Shalayeff
@@ -1175,7 +1175,7 @@ setregs(p, pack, stack, retval)
tf->tf_r3 = stack;
suword((caddr_t)(stack), 0);
stack += HPPA_FRAME_SIZE;
- suword((caddr_t)(stack - HPPA_FRAME_CRP), 0);
+ suword((caddr_t)(stack + HPPA_FRAME_CRP), 0);
tf->tf_sp = stack;
retval[1] = 0;
@@ -1237,8 +1237,8 @@ sendsig(catcher, sig, mask, code, type, val)
sigexit(p, SIGILL);
sss += HPPA_FRAME_SIZE;
- if (suword((caddr_t)scp + sss - HPPA_FRAME_PSP, 0) ||
- suword((caddr_t)scp + sss - HPPA_FRAME_CRP, 0))
+ if (suword((caddr_t)scp + sss, 0) ||
+ suword((caddr_t)scp + sss + HPPA_FRAME_CRP, 0))
sigexit(p, SIGILL);
#ifdef DEBUG
diff --git a/sys/arch/hppa/hppa/vm_machdep.c b/sys/arch/hppa/hppa/vm_machdep.c
index e0e01a7d925..dd2f8bdf687 100644
--- a/sys/arch/hppa/hppa/vm_machdep.c
+++ b/sys/arch/hppa/hppa/vm_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vm_machdep.c,v 1.41 2002/09/05 21:37:18 mickey Exp $ */
+/* $OpenBSD: vm_machdep.c,v 1.42 2002/09/11 15:55:58 mickey Exp $ */
/*
* Copyright (c) 1999-2002 Michael Shalayeff
@@ -105,7 +105,8 @@ pagemove(from, to, size)
paddr_t pa;
while (size > 0) {
- pmap_extract(pmap_kernel(), (vaddr_t)from, &pa);
+ if (pmap_extract(pmap_kernel(), (vaddr_t)from, &pa) == FALSE)
+ panic("pagemove");
pmap_kremove((vaddr_t)from, PAGE_SIZE);
pmap_kenter_pa((vaddr_t)to, pa, UVM_PROT_RW);
from += PAGE_SIZE;
@@ -214,7 +215,7 @@ cpu_fork(p1, p2, stack, stacksize, func, arg)
*HPPA_FRAME_CARG(0, sp) = tf->tf_sp;
*HPPA_FRAME_CARG(1, sp) = KERNMODE(func);
*HPPA_FRAME_CARG(2, sp) = (register_t)arg;
- *(register_t*)(osp) = 0;
+ *(register_t*)(osp) = (sp - HPPA_FRAME_SIZE);
*(register_t*)(sp + HPPA_FRAME_PSP) = osp;
*(register_t*)(osp + HPPA_FRAME_CRP) = (register_t)&switch_trampoline;
tf->tf_sp = sp;
@@ -233,8 +234,6 @@ cpu_exit(p)
exit2(p);
cpu_switch(p);
-
- /* switch_exit(p); */
}
void