vm_machdep.c (36135) | vm_machdep.c (36168) |
---|---|
1/*- 2 * Copyright (c) 1982, 1986 The Regents of the University of California. 3 * Copyright (c) 1989, 1990 William Jolitz 4 * Copyright (c) 1994 John Dyson 5 * All rights reserved. 6 * 7 * This code is derived from software contributed to Berkeley by 8 * the Systems Programming Group of the University of Utah Computer --- 24 unchanged lines hidden (view full) --- 33 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 34 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 37 * SUCH DAMAGE. 38 * 39 * from: @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91 40 * Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$ | 1/*- 2 * Copyright (c) 1982, 1986 The Regents of the University of California. 3 * Copyright (c) 1989, 1990 William Jolitz 4 * Copyright (c) 1994 John Dyson 5 * All rights reserved. 6 * 7 * This code is derived from software contributed to Berkeley by 8 * the Systems Programming Group of the University of Utah Computer --- 24 unchanged lines hidden (view full) --- 33 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 34 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 37 * SUCH DAMAGE. 38 * 39 * from: @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91 40 * Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$ |
41 * $Id: vm_machdep.c,v 1.106 1998/05/16 14:44:11 kato Exp $ | 41 * $Id: vm_machdep.c,v 1.107 1998/05/17 22:12:11 tegge Exp $ |
42 */ 43 44#include "npx.h" 45#include "opt_bounce.h" 46#include "opt_user_ldt.h" 47#include "opt_vm86.h" 48#ifdef PC98 49#include "opt_pc98.h" --- 687 unchanged lines hidden (view full) --- 737 * Dump the machine specific header information at the start of a core dump. 738 */ 739int 740cpu_coredump(p, vp, cred) 741 struct proc *p; 742 struct vnode *vp; 743 struct ucred *cred; 744{ | 42 */ 43 44#include "npx.h" 45#include "opt_bounce.h" 46#include "opt_user_ldt.h" 47#include "opt_vm86.h" 48#ifdef PC98 49#include "opt_pc98.h" --- 687 unchanged lines hidden (view full) --- 737 * Dump the machine specific header information at the start of a core dump. 738 */ 739int 740cpu_coredump(p, vp, cred) 741 struct proc *p; 742 struct vnode *vp; 743 struct ucred *cred; 744{ |
745 int error; 746 caddr_t tempuser; |
|
745 | 747 |
746 return (vn_rdwr(UIO_WRITE, vp, (caddr_t) p->p_addr, ctob(UPAGES), 747 (off_t)0, UIO_SYSSPACE, IO_NODELOCKED|IO_UNIT, cred, (int *)NULL, 748 p)); | 748 tempuser = malloc(ctob(UPAGES), M_TEMP, M_WAITOK); 749 if (!tempuser) 750 return EINVAL; 751 752 bzero(tempuser, ctob(UPAGES)); 753 bcopy(p->p_addr, tempuser, sizeof(struct user)); 754 bcopy(p->p_md.md_regs, 755 tempuser + ((caddr_t) p->p_md.md_regs - (caddr_t) p->p_addr), 756 sizeof(struct trapframe)); 757 758 error = vn_rdwr(UIO_WRITE, vp, (caddr_t) tempuser, 759 ctob(UPAGES), 760 (off_t)0, UIO_SYSSPACE, IO_NODELOCKED|IO_UNIT, 761 cred, (int *)NULL, p); 762 763 free(tempuser, M_TEMP); 764 765 return error; |
749} 750 751#ifdef notyet 752static void 753setredzone(pte, vaddr) 754 u_short *pte; 755 caddr_t vaddr; 756{ --- 367 unchanged lines hidden --- | 766} 767 768#ifdef notyet 769static void 770setredzone(pte, vaddr) 771 u_short *pte; 772 caddr_t vaddr; 773{ --- 367 unchanged lines hidden --- |