summaryrefslogtreecommitdiff
path: root/sys/arch/hppa
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2000-01-17 20:18:17 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2000-01-17 20:18:17 +0000
commitc775907f4b03f718c0437f659ce9421c0e0a1b42 (patch)
tree4fd76cb27f941ae9f177a910680f25060d42dd8a /sys/arch/hppa
parent9cf99e1dd2bc9cd40a374ef0a43b36c874fd0e13 (diff)
remove unneeded stuff from setregs; force single-user for now, enable signal debug
Diffstat (limited to 'sys/arch/hppa')
-rw-r--r--sys/arch/hppa/hppa/machdep.c30
-rw-r--r--sys/arch/hppa/hppa/vm_machdep.c14
2 files changed, 23 insertions, 21 deletions
diff --git a/sys/arch/hppa/hppa/machdep.c b/sys/arch/hppa/hppa/machdep.c
index f6e35cf96bc..803dbee5144 100644
--- a/sys/arch/hppa/hppa/machdep.c
+++ b/sys/arch/hppa/hppa/machdep.c
@@ -1,7 +1,7 @@
-/* $OpenBSD: machdep.c,v 1.18 2000/01/11 20:27:56 mickey Exp $ */
+/* $OpenBSD: machdep.c,v 1.19 2000/01/17 20:18:16 mickey Exp $ */
/*
- * Copyright (c) 1999 Michael Shalayeff
+ * Copyright (c) 1999-2000 Michael Shalayeff
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -167,7 +167,7 @@ struct pdc_coproc pdc_coproc PDC_ALIGNMENT;
struct pdc_coherence pdc_coherence PDC_ALIGNMENT;
#ifdef DEBUG
-int sigdebug;
+int sigdebug = 0xff;
pid_t sigpid;
#define SDB_FOLLOW 0x01
#endif
@@ -182,6 +182,8 @@ hppa_init(start)
register int error;
int hptsize; /* size of HPT table if supported */
+ boothowto |= RB_SINGLE; /* XXX always go into single-user while debug */
+
pdc_init(); /* init PDC iface, so we can call em easy */
cpu_hzticks = (PAGE0->mem_10msec * 100) / hz;
@@ -941,31 +943,21 @@ setregs(p, pack, stack, retval)
u_long stack;
register_t *retval;
{
- register struct trapframe *tf;
+ register struct trapframe *tf = p->p_md.md_regs;
+ /* register struct pcb *pcb = &p->p_addr->u_pcb; */
#ifdef DEBUG
/*extern int pmapdebug;*/
/*pmapdebug = 13;*/
- printf("setregs(%p, %p, %x, %p), ep=%x\n",
- p, pack, stack, retval, pack->ep_entry);
+ printf("setregs(%p, %p, %x, %p), ep=%x, cr30=%x\n",
+ p, pack, stack, retval, pack->ep_entry, tf->tf_cr30);
#endif
- /* FPU: setup regs */
- tf = p->p_md.md_regs;
/* tf->tf_r?? = PS_STRINGS */
- tf->tf_ipsw = PSW_C | PSW_Q | PSW_P | PSW_D | PSW_I;
- tf->tf_iioq_head = tf->tf_iioq_tail =
- pack->ep_entry | HPPA_PC_PRIV_USER;
- tf->tf_iisq_head = tf->tf_iisq_tail = p->p_addr->u_pcb.pcb_space;
+ tf->tf_iioq_tail = 4 +
+ (tf->tf_iioq_head = pack->ep_entry | HPPA_PC_PRIV_USER);
tf->tf_rp = 0;
tf->tf_arg0 = stack;
tf->tf_arg1 = tf->tf_arg2 = 0; /* XXX dynload stuff */
- tf->tf_eiem = 0;
- tf->tf_sr4 = p->p_addr->u_pcb.pcb_space;
- tf->tf_sr5 = p->p_addr->u_pcb.pcb_space;
- tf->tf_sr6 = p->p_addr->u_pcb.pcb_space;
- tf->tf_sr7 = HPPA_SID_KERNEL;
- tf->tf_pidr1 = p->p_vmspace->vm_map.pmap->pmap_pid;
- tf->tf_pidr2 = p->p_vmspace->vm_map.pmap->pmap_pid;
/* setup terminal stack frame */
stack += HPPA_FRAME_SIZE;
diff --git a/sys/arch/hppa/hppa/vm_machdep.c b/sys/arch/hppa/hppa/vm_machdep.c
index dd5f80f51e4..9bc12da289c 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.13 2000/01/17 06:02:49 mickey Exp $ */
+/* $OpenBSD: vm_machdep.c,v 1.14 2000/01/17 20:18:16 mickey Exp $ */
/*
* Copyright (c) 1999-2000 Michael Shalayeff
@@ -218,10 +218,20 @@ cpu_fork(p1, p2, stack, stacksize)
p2->p_vmspace->vm_map.pmap->pmap_space;
tf->tf_iisq_head = tf->tf_iisq_tail =
p2->p_vmspace->vm_map.pmap->pmap_space;
- tf->tf_sr7 = HPPA_SID_KERNEL;
tf->tf_pidr1 = tf->tf_pidr2 = p2->p_vmspace->vm_map.pmap->pmap_pid;
/*
+ * theoretically these could be inherited from the father,
+ * but just in case.
+ */
+#ifdef DIAGNOSTIC
+ tf->tf_sr7 = HPPA_SID_KERNEL;
+ tf->tf_eiem = ~0;
+ tf->tf_ipsw = PSW_C | PSW_Q | PSW_P | PSW_D | PSW_I /* | PSW_L */;
+ pcbp->pcb_fpregs[32] = 0;
+#endif
+
+ /*
* If specified, give the child a different stack.
*/
if (stack != NULL)