Module Name: src Committed By: reinoud Date: Tue Aug 30 16:06:20 UTC 2011
Modified Files: src/sys/arch/usermode/usermode: machdep.c Log Message: Hack to try to help usermode/i386 by setting the EBX register To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/arch/usermode/usermode/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/usermode/usermode/machdep.c diff -u src/sys/arch/usermode/usermode/machdep.c:1.18 src/sys/arch/usermode/usermode/machdep.c:1.19 --- src/sys/arch/usermode/usermode/machdep.c:1.18 Mon Aug 29 12:46:58 2011 +++ src/sys/arch/usermode/usermode/machdep.c Tue Aug 30 16:06:20 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.18 2011/08/29 12:46:58 reinoud Exp $ */ +/* $NetBSD: machdep.c,v 1.19 2011/08/30 16:06:20 reinoud Exp $ */ /*- * Copyright (c) 2007 Jared D. McNeill <jmcne...@invisible.ca> @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.18 2011/08/29 12:46:58 reinoud Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.19 2011/08/30 16:06:20 reinoud Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -150,6 +150,12 @@ ucp->uc_stack.ss_size = pack->ep_ssize; thunk_makecontext_trapframe2go(ucp, (void *) pack->ep_entry, &pcb->pcb_tf); +#ifdef __i386__ +int *reg; +reg = (int *) &ucp->uc_mcontext; +reg[8] = l->l_proc->p_psstrp; /* _REG_EBX */ +#endif + printf("updated pcb %p\n", pcb); printf("\tpcb->pcb_ucp.uc_stack.ss_sp = %p\n", pcb->pcb_ucp.uc_stack.ss_sp); printf("\tpcb->pcb_ucp.uc_stack.ss_size = %d\n", (int) pcb->pcb_ucp.uc_stack.ss_size);