CVS commit: [matt-nb5-mips64] src/sys/sys
Module Name:src Committed By: matt Date: Sat Feb 15 10:14:10 UTC 2014 Modified Files: src/sys/sys [matt-nb5-mips64]: ucontext.h Log Message: add prototype for cpu_mcontext_validate To generate a diff of this commit: cvs rdiff -u -r1.11.12.1 -r1.11.12.2 src/sys/sys/ucontext.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/ucontext.h diff -u src/sys/sys/ucontext.h:1.11.12.1 src/sys/sys/ucontext.h:1.11.12.2 --- src/sys/sys/ucontext.h:1.11.12.1 Fri Apr 29 08:14:36 2011 +++ src/sys/sys/ucontext.h Sat Feb 15 10:14:10 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ucontext.h,v 1.11.12.1 2011/04/29 08:14:36 matt Exp $ */ +/* $NetBSD: ucontext.h,v 1.11.12.2 2014/02/15 10:14:10 matt Exp $ */ /*- * Copyright (c) 1999, 2003 The NetBSD Foundation, Inc. @@ -86,6 +86,8 @@ void getucontext_sa(struct lwp *, uconte int setucontext(struct lwp *, const ucontext_t *); void cpu_getmcontext(struct lwp *, mcontext_t *, unsigned int *); int cpu_setmcontext(struct lwp *, const mcontext_t *, unsigned int); +int cpu_mcontext_validate(struct lwp *, const mcontext_t *); + #endif /* _KERNEL */ #endif /* !_SYS_UCONTEXT_H_ */
CVS commit: [matt-nb5-mips64] src/sys/sys
Module Name:src Committed By: matt Date: Sat Feb 15 10:14:35 UTC 2014 Modified Files: src/sys/sys [matt-nb5-mips64]: syscallvar.h Log Message: Add sy_invoke inline from HEAD To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.2.8.1 src/sys/sys/syscallvar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/syscallvar.h diff -u src/sys/sys/syscallvar.h:1.2 src/sys/sys/syscallvar.h:1.2.8.1 --- src/sys/sys/syscallvar.h:1.2 Tue Oct 21 12:22:00 2008 +++ src/sys/sys/syscallvar.h Sat Feb 15 10:14:35 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: syscallvar.h,v 1.2 2008/10/21 12:22:00 ad Exp $ */ +/* $NetBSD: syscallvar.h,v 1.2.8.1 2014/02/15 10:14:35 matt Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -52,4 +52,31 @@ sy_call(const struct sysent *sy, struct return error; } +static inline int +sy_invoke(const struct sysent *sy, struct lwp *l, const void *uap, + register_t *rval, int code) +{ + const bool do_trace = l-l_proc-p_trace_enabled + (sy-sy_flags SYCALL_INDIRECT) == 0; + int error; + + if (__predict_true(!do_trace) || (error = trace_enter(code, uap, + sy-sy_narg)) == 0) { + rval[0] = 0; +#if !defined(__mips__) + /* + * Due to the mips userland code for SYS_break needing v1 to be + * preserved, we can't clear this on mips. + */ + rval[1] = 0; +#endif + error = sy_call(sy, l, uap, rval); + } + + if (__predict_false(do_trace)) { + trace_exit(code, rval, error); + } + return error; +} + #endif /* _SYS_SYSCALLVAR_H_ */
CVS commit: [matt-nb5-mips64] src/sys/sys
Module Name:src Committed By: matt Date: Fri May 20 14:14:52 UTC 2011 Modified Files: src/sys/sys [matt-nb5-mips64]: cpu_data.h Log Message: ci_node_id - ci_package_id (match current) To generate a diff of this commit: cvs rdiff -u -r1.27.16.2 -r1.27.16.3 src/sys/sys/cpu_data.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/cpu_data.h diff -u src/sys/sys/cpu_data.h:1.27.16.2 src/sys/sys/cpu_data.h:1.27.16.3 --- src/sys/sys/cpu_data.h:1.27.16.2 Fri Apr 29 08:13:53 2011 +++ src/sys/sys/cpu_data.h Fri May 20 14:14:51 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu_data.h,v 1.27.16.2 2011/04/29 08:13:53 matt Exp $ */ +/* cpu_data.h,v 1.27.16.2 2011/04/29 08:13:53 matt Exp */ /*- * Copyright (c) 2004, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -113,7 +113,7 @@ #define ci_spin_locks2 ci_data.cpu_spin_locks2 #define ci_lkdebug_recurse ci_data.cpu_lkdebug_recurse -#define ci_node_id ci_data.cpu_node_id +#define ci_package_id ci_data.cpu_package_id #define ci_core_id ci_data.cpu_core_id #define ci_smt_id ci_data.cpu_smt_id
CVS commit: [matt-nb5-mips64] src/sys/sys
Module Name:src Committed By: matt Date: Fri Apr 29 08:11:22 UTC 2011 Modified Files: src/sys/sys [matt-nb5-mips64]: Makefile Log Message: Add tls.h To generate a diff of this commit: cvs rdiff -u -r1.114 -r1.114.8.1 src/sys/sys/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/Makefile diff -u src/sys/sys/Makefile:1.114 src/sys/sys/Makefile:1.114.8.1 --- src/sys/sys/Makefile:1.114 Sun Oct 19 22:05:23 2008 +++ src/sys/sys/Makefile Fri Apr 29 08:11:22 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.114 2008/10/19 22:05:23 apb Exp $ +# $NetBSD: Makefile,v 1.114.8.1 2011/04/29 08:11:22 matt Exp $ .include bsd.sys.mk @@ -33,7 +33,7 @@ syscall.h syscallargs.h sysctl.h stdint.h swap.h \ syncobj.h syslimits.h syslog.h \ tape.h termios.h time.h timeb.h timepps.h times.h \ - timex.h trace.h tree.h tty.h ttychars.h ttycom.h \ + timex.h tls.h trace.h tree.h tty.h ttychars.h ttycom.h \ ttydefaults.h ttydev.h types.h \ ucontext.h ucred.h uio.h un.h unistd.h unpcb.h user.h utsname.h uuid.h \ vadvise.h verified_exec.h videoio.h vmmeter.h vnode.h vnode_if.h \
CVS commit: [matt-nb5-mips64] src/sys/sys
Module Name:src Committed By: matt Date: Fri Apr 29 08:13:53 UTC 2011 Modified Files: src/sys/sys [matt-nb5-mips64]: cpu_data.h Log Message: Change cpu_node_id to cpu_package_id to be like current. To generate a diff of this commit: cvs rdiff -u -r1.27.16.1 -r1.27.16.2 src/sys/sys/cpu_data.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/cpu_data.h diff -u src/sys/sys/cpu_data.h:1.27.16.1 src/sys/sys/cpu_data.h:1.27.16.2 --- src/sys/sys/cpu_data.h:1.27.16.1 Sun May 9 20:25:45 2010 +++ src/sys/sys/cpu_data.h Fri Apr 29 08:13:53 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu_data.h,v 1.27.16.1 2010/05/09 20:25:45 rmind Exp $ */ +/* $NetBSD: cpu_data.h,v 1.27.16.2 2011/04/29 08:13:53 matt Exp $ */ /*- * Copyright (c) 2004, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -71,7 +71,7 @@ lwp_t *cpu_onproc; /* bottom level LWP */ CIRCLEQ_ENTRY(cpu_info) cpu_qchain; /* circleq of all CPUs */ - cpuid_t cpu_node_id; + cpuid_t cpu_package_id; cpuid_t cpu_core_id; cpuid_t cpu_smt_id;
CVS commit: [matt-nb5-mips64] src/sys/sys
Module Name:src Committed By: matt Date: Tue May 11 20:58:10 UTC 2010 Modified Files: src/sys/sys [matt-nb5-mips64]: ktrace.h Log Message: Properly pad some structures to 64bit. A N32 ktruss on a N64 kernel now works (this might not work for sparc/x86 if their register_t for 32bit isn't the same size as register_t). To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.55.10.1 src/sys/sys/ktrace.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/ktrace.h diff -u src/sys/sys/ktrace.h:1.55 src/sys/sys/ktrace.h:1.55.10.1 --- src/sys/sys/ktrace.h:1.55 Mon Oct 20 11:36:39 2008 +++ src/sys/sys/ktrace.h Tue May 11 20:58:10 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: ktrace.h,v 1.55 2008/10/20 11:36:39 ad Exp $ */ +/* $NetBSD: ktrace.h,v 1.55.10.1 2010/05/11 20:58:10 matt Exp $ */ /* * Copyright (c) 1988, 1993 @@ -66,10 +66,12 @@ union { struct timeval _tv; /* v0 timestamp */ struct timespec _ts; /* v1 timespec */ + uint64_t _tpad[2]; } _ktr_time; union { const void *_buf; /* v0 unused */ lwpid_t _lid; /* v1 lwp id */ + register_t *_reg; /* for alignment */ } _ktr_id; };
CVS commit: [matt-nb5-mips64] src/sys/sys
Module Name:src Committed By: rmind Date: Sun May 9 20:25:45 UTC 2010 Modified Files: src/sys/sys [matt-nb5-mips64]: cpu_data.h Log Message: Pull-up rev 1.30 from HEAD. OK m...@. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.27.16.1 src/sys/sys/cpu_data.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/cpu_data.h diff -u src/sys/sys/cpu_data.h:1.27 src/sys/sys/cpu_data.h:1.27.16.1 --- src/sys/sys/cpu_data.h:1.27 Tue Jun 3 15:50:22 2008 +++ src/sys/sys/cpu_data.h Sun May 9 20:25:45 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu_data.h,v 1.27 2008/06/03 15:50:22 ad Exp $ */ +/* $NetBSD: cpu_data.h,v 1.27.16.1 2010/05/09 20:25:45 rmind Exp $ */ /*- * Copyright (c) 2004, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -70,7 +70,11 @@ int cpu_xcall_pending; /* cross-call support */ lwp_t *cpu_onproc; /* bottom level LWP */ CIRCLEQ_ENTRY(cpu_info) cpu_qchain; /* circleq of all CPUs */ - + + cpuid_t cpu_node_id; + cpuid_t cpu_core_id; + cpuid_t cpu_smt_id; + /* * This section is mostly CPU-private. */ @@ -109,6 +113,10 @@ #define ci_spin_locks2 ci_data.cpu_spin_locks2 #define ci_lkdebug_recurse ci_data.cpu_lkdebug_recurse +#define ci_node_id ci_data.cpu_node_id +#define ci_core_id ci_data.cpu_core_id +#define ci_smt_id ci_data.cpu_smt_id + int mi_cpu_attach(struct cpu_info *ci); #endif /* _SYS_CPU_DATA_H_ */
CVS commit: [matt-nb5-mips64] src/sys/sys
Module Name:src Committed By: matt Date: Fri May 7 06:15:07 UTC 2010 Modified Files: src/sys/sys [matt-nb5-mips64]: disklabel.h Log Message: Add a uint64_t to the union so that disklabel will have the same layout on both LP64 and IPL32. To generate a diff of this commit: cvs rdiff -u -r1.102 -r1.102.10.1 src/sys/sys/disklabel.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/disklabel.h diff -u src/sys/sys/disklabel.h:1.102 src/sys/sys/disklabel.h:1.102.10.1 --- src/sys/sys/disklabel.h:1.102 Tue Aug 19 12:16:49 2008 +++ src/sys/sys/disklabel.h Fri May 7 06:15:07 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: disklabel.h,v 1.102 2008/08/19 12:16:49 haad Exp $ */ +/* $NetBSD: disklabel.h,v 1.102.10.1 2010/05/07 06:15:07 matt Exp $ */ /* * Copyright (c) 1987, 1988, 1993 @@ -117,6 +117,7 @@ char *un_d_boot0; /* primary bootstrap name */ char *un_d_boot1; /* secondary bootstrap name */ } un_b; + uint64_t un_d_pad; /* force 8 byte alignment */ } d_un; #define d_packname d_un.un_d_packname #define d_boot0 d_un.un_b.un_d_boot0
CVS commit: [matt-nb5-mips64] src/sys/sys
Module Name:src Committed By: matt Date: Sat Jan 2 21:40:49 UTC 2010 Modified Files: src/sys/sys [matt-nb5-mips64]: kcore.h Log Message: add a struct tag. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.2.94.1 src/sys/sys/kcore.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/kcore.h diff -u src/sys/sys/kcore.h:1.2 src/sys/sys/kcore.h:1.2.94.1 --- src/sys/sys/kcore.h:1.2 Mon Dec 26 18:41:36 2005 +++ src/sys/sys/kcore.h Sat Jan 2 21:40:49 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: kcore.h,v 1.2 2005/12/26 18:41:36 perry Exp $ */ +/* $NetBSD: kcore.h,v 1.2.94.1 2010/01/02 21:40:49 matt Exp $ */ /* * Copyright (c) 1996 Leo Weppelman. @@ -44,7 +44,7 @@ * Description of a memory segment. To make this suitable for sharing * between all architectures, u_quad_t seems to be the necessary type... */ -typedef struct { +typedef struct phys_ram_seg { u_quad_t start; /* Physical start address */ u_quad_t size; /* Size in bytes */ } phys_ram_seg_t;
CVS commit: [matt-nb5-mips64] src/sys/sys
Module Name:src Committed By: matt Date: Sun Aug 23 06:35:20 UTC 2009 Modified Files: src/sys/sys [matt-nb5-mips64]: exec.h Log Message: Change various u_long to vaddr_t or vsize_t as appropriate. To generate a diff of this commit: cvs rdiff -u -r1.124 -r1.124.10.1 src/sys/sys/exec.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/exec.h diff -u src/sys/sys/exec.h:1.124 src/sys/sys/exec.h:1.124.10.1 --- src/sys/sys/exec.h:1.124 Wed Jul 2 17:28:57 2008 +++ src/sys/sys/exec.h Sun Aug 23 06:35:19 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: exec.h,v 1.124 2008/07/02 17:28:57 ad Exp $ */ +/* $NetBSD: exec.h,v 1.124.10.1 2009/08/23 06:35:19 matt Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -150,7 +150,7 @@ int (*es_copyargs)(struct lwp *, struct exec_package *, struct ps_strings *, char **, void *); /* Set registers before execution */ - void (*es_setregs)(struct lwp *, struct exec_package *, u_long); + void (*es_setregs)(struct lwp *, struct exec_package *, vaddr_t); /* Dump core */ int (*es_coredump)(struct lwp *, void *); int (*es_setup_stack)(struct lwp *, struct exec_package *); @@ -178,14 +178,14 @@ struct exec_vmcmd_set ep_vmcmds; /* vmcmds used to build vmspace */ struct vnode *ep_vp; /* executable's vnode */ struct vattr *ep_vap; /* executable's attributes */ - u_long ep_taddr; /* process's text address */ - u_long ep_tsize; /* size of process's text */ - u_long ep_daddr; /* process's data(+bss) address */ - u_long ep_dsize; /* size of process's data(+bss) */ - u_long ep_maxsaddr; /* proc's max stack addr (top) */ - u_long ep_minsaddr; /* proc's min stack addr (bottom) */ - u_long ep_ssize; /* size of process's stack */ - u_long ep_entry; /* process's entry point */ + vaddr_t ep_taddr; /* process's text address */ + vsize_t ep_tsize; /* size of process's text */ + vaddr_t ep_daddr; /* process's data(+bss) address */ + vsize_t ep_dsize; /* size of process's data(+bss) */ + vaddr_t ep_maxsaddr; /* proc's max stack addr (top) */ + vaddr_t ep_minsaddr; /* proc's min stack addr (bottom) */ + vsize_t ep_ssize; /* size of process's stack */ + vaddr_t ep_entry; /* process's entry point */ vaddr_t ep_vm_minaddr; /* bottom of process address space */ vaddr_t ep_vm_maxaddr; /* top of process address space */ u_int ep_flags; /* flags; see below. */ @@ -212,10 +212,10 @@ struct exec_vmcmd { int (*ev_proc)(struct lwp *, struct exec_vmcmd *); /* procedure to run for region of vmspace */ - u_long ev_len; /* length of the segment to map */ - u_long ev_addr; /* address in the vmspace to place it at */ + vsize_t ev_len; /* length of the segment to map */ + vaddr_t ev_addr; /* address in the vmspace to place it at */ struct vnode *ev_vp; /* vnode pointer for the file w/the data */ - u_long ev_offset; /* offset in the file for the data */ + vsize_t ev_offset; /* offset in the file for the data */ u_int ev_prot; /* protections for segment */ int ev_flags; #define VMCMD_RELATIVE 0x0001 /* ev_addr is relative to base entry */