Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-6]: src Pull up following revision(s) (requested by chs in ticket...



details:   https://anonhg.NetBSD.org/src/rev/4191a83a9027
branches:  netbsd-6
changeset: 775492:4191a83a9027
user:      riz <riz%NetBSD.org@localhost>
date:      Thu Nov 22 17:39:28 2012 +0000

description:
Pull up following revision(s) (requested by chs in ticket #690):
        external/cddl/osnet/dev/dtrace/amd64/dtrace_isa.c: revision 1.4
        sys/arch/amd64/include/Makefile.inc: revision 1.4
        sys/arch/amd64/include/pmap.h: revision 1.33
        external/cddl/osnet/dev/dtrace/amd64/dtrace_subr.c: revision 1.6
        sys/arch/amd64/include/asm.h: revision 1.15
        sys/arch/amd64/amd64/genassym.cf: revision 1.51
        external/cddl/osnet/dev/dtrace/amd64/dtrace_asm.S: revision 1.4
make dtrace work on amd64.
allow more space for modules.

diffstat:

 external/cddl/osnet/dev/dtrace/amd64/dtrace_asm.S  |   9 +++------
 external/cddl/osnet/dev/dtrace/amd64/dtrace_isa.c  |  13 ++++++-------
 external/cddl/osnet/dev/dtrace/amd64/dtrace_subr.c |  14 +++++++++++++-
 sys/arch/amd64/amd64/genassym.cf                   |   4 +++-
 sys/arch/amd64/include/Makefile.inc                |   4 ++--
 sys/arch/amd64/include/asm.h                       |   3 ++-
 sys/arch/amd64/include/pmap.h                      |   4 ++--
 7 files changed, 31 insertions(+), 20 deletions(-)

diffs (168 lines):

diff -r b82d95b851d4 -r 4191a83a9027 external/cddl/osnet/dev/dtrace/amd64/dtrace_asm.S
--- a/external/cddl/osnet/dev/dtrace/amd64/dtrace_asm.S Thu Nov 22 17:37:38 2012 +0000
+++ b/external/cddl/osnet/dev/dtrace/amd64/dtrace_asm.S Thu Nov 22 17:39:28 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dtrace_asm.S,v 1.3 2010/03/13 22:31:15 christos Exp $  */
+/*     $NetBSD: dtrace_asm.S,v 1.3.8.1 2012/11/22 17:39:28 riz Exp $   */
 
 /*
  * CDDL HEADER START
@@ -32,7 +32,6 @@
 
 #define _ASM
 
-
 #include <sys/cpuvar_defs.h>
 #include <sys/dtrace.h>
 #include <machine/asm.h>
@@ -65,8 +64,6 @@
 1:     addq    $TF_RIP,%rsp;
 
 
-       .globl  calltrap
-       .type   calltrap,@function
        ENTRY(dtrace_invop_start)
 
        /*
@@ -81,7 +78,7 @@
        pushq   (%rsi)
        movq    %rsp, %rsi
        call    dtrace_invop
-//     ALTENTRY(dtrace_invop_callsite)
+       ALTENTRY(dtrace_invop_callsite)
        addq    $8, %rsp
        cmpl    $DTRACE_INVOP_PUSHL_EBP, %eax
        je      bp_push
@@ -147,7 +144,7 @@
        /*NOTREACHED*/
 
 bp_ret:
-//     INTR_POP
+       INTR_POP
        pushq   %rax                    /* push temp */
        movq    32(%rsp), %rax          /* load %rsp */
        movq    (%rax), %rax            /* load calling RIP */
diff -r b82d95b851d4 -r 4191a83a9027 external/cddl/osnet/dev/dtrace/amd64/dtrace_isa.c
--- a/external/cddl/osnet/dev/dtrace/amd64/dtrace_isa.c Thu Nov 22 17:37:38 2012 +0000
+++ b/external/cddl/osnet/dev/dtrace/amd64/dtrace_isa.c Thu Nov 22 17:39:28 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dtrace_isa.c,v 1.3 2010/03/13 22:31:15 christos Exp $  */
+/*     $NetBSD: dtrace_isa.c,v 1.3.8.1 2012/11/22 17:39:28 riz Exp $   */
 
 /*
  * CDDL HEADER START
@@ -52,15 +52,14 @@
 uint32_t dtrace_fuword32_nocheck(void *);
 uint64_t dtrace_fuword64_nocheck(void *);
 
-uintptr_t kernelbase = (uintptr_t)KERNBASE;
-        
-#define INKERNEL(va) (((vm_offset_t)(va)) >= USRSTACK && \
-     ((vm_offset_t)(va)) < VM_MAX_KERNEL_ADDRESS)
+uintptr_t kernelbase = (uintptr_t)KERN_BASE;
+
+#define INKERNEL(va) ((intptr_t)(va) < 0)
 
 struct amd64_frame {     
        struct amd64_frame      *f_frame;
-       int                      f_retaddr; 
-       int                      f_arg0;
+       uintptr_t                f_retaddr; 
+       uintptr_t                f_arg0;
 };
 
 typedef unsigned long vm_offset_t;
diff -r b82d95b851d4 -r 4191a83a9027 external/cddl/osnet/dev/dtrace/amd64/dtrace_subr.c
--- a/external/cddl/osnet/dev/dtrace/amd64/dtrace_subr.c        Thu Nov 22 17:37:38 2012 +0000
+++ b/external/cddl/osnet/dev/dtrace/amd64/dtrace_subr.c        Thu Nov 22 17:39:28 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dtrace_subr.c,v 1.5 2011/08/31 21:57:16 christos Exp $ */
+/*     $NetBSD: dtrace_subr.c,v 1.5.4.1 2012/11/22 17:39:28 riz Exp $  */
 
 /*
  * CDDL HEADER START
@@ -374,6 +374,18 @@
 }
 #endif
 
+#ifdef __NetBSD__
+static __inline uint64_t
+dtrace_rdtsc(void)
+{
+       uint32_t hi, lo;
+
+       __asm volatile("rdtsc" : "=d" (hi), "=a" (lo));
+       return (((uint64_t)hi << 32) | (uint64_t) lo);
+}
+#define rdtsc dtrace_rdtsc
+#endif
+
 #ifdef notyet
 static int64_t tgt_cpu_tsc;
 static int64_t hst_cpu_tsc;
diff -r b82d95b851d4 -r 4191a83a9027 sys/arch/amd64/amd64/genassym.cf
--- a/sys/arch/amd64/amd64/genassym.cf  Thu Nov 22 17:37:38 2012 +0000
+++ b/sys/arch/amd64/amd64/genassym.cf  Thu Nov 22 17:39:28 2012 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: genassym.cf,v 1.49.2.1 2012/05/09 03:22:55 riz Exp $
+#      $NetBSD: genassym.cf,v 1.49.2.2 2012/11/22 17:39:28 riz Exp $
 
 #
 # Copyright (c) 1998, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -372,3 +372,5 @@
 define VM_MIN_KERNEL_ADDRESS_HIGH32    (VM_MIN_KERNEL_ADDRESS >> 32)
 
 define RESCHED_KPREEMPT        RESCHED_KPREEMPT
+
+define SEL_RPL_MASK            SEL_RPL
diff -r b82d95b851d4 -r 4191a83a9027 sys/arch/amd64/include/Makefile.inc
--- a/sys/arch/amd64/include/Makefile.inc       Thu Nov 22 17:37:38 2012 +0000
+++ b/sys/arch/amd64/include/Makefile.inc       Thu Nov 22 17:39:28 2012 +0000
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile.inc,v 1.3 2009/11/27 13:50:29 pooka Exp $
+# $NetBSD: Makefile.inc,v 1.3.24.1 2012/11/22 17:39:28 riz Exp $
 
 CFLAGS+=       -mno-red-zone
 
 # this should really be !(RUMPKERNEL && PIC)
 .if !defined(RUMPKERNEL)
-CFLAGS+=       -mcmodel=kernel
+CFLAGS+=       -mcmodel=kernel -fno-omit-frame-pointer
 .endif
 
 USE_SSP?=      yes
diff -r b82d95b851d4 -r 4191a83a9027 sys/arch/amd64/include/asm.h
--- a/sys/arch/amd64/include/asm.h      Thu Nov 22 17:37:38 2012 +0000
+++ b/sys/arch/amd64/include/asm.h      Thu Nov 22 17:39:28 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: asm.h,v 1.14 2010/12/20 21:11:24 joerg Exp $   */
+/*     $NetBSD: asm.h,v 1.14.14.1 2012/11/22 17:39:28 riz Exp $        */
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -101,6 +101,7 @@
 
 #define        ENTRY(y)        _ENTRY(_C_LABEL(y)); _PROF_PROLOGUE
 #define        NENTRY(y)       _ENTRY(_C_LABEL(y))
+#define        ALTENTRY(x)     NENTRY(x)
 #define        ASENTRY(y)      _ENTRY(_ASM_LABEL(y)); _PROF_PROLOGUE
 #define        LABEL(y)        _LABEL(_C_LABEL(y))
 
diff -r b82d95b851d4 -r 4191a83a9027 sys/arch/amd64/include/pmap.h
--- a/sys/arch/amd64/include/pmap.h     Thu Nov 22 17:37:38 2012 +0000
+++ b/sys/arch/amd64/include/pmap.h     Thu Nov 22 17:39:28 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.h,v 1.31 2012/01/19 22:00:56 bouyer Exp $ */
+/*     $NetBSD: pmap.h,v 1.31.2.1 2012/11/22 17:39:28 riz Exp $        */
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -204,7 +204,7 @@
 
 #define NKL4_KIMG_ENTRIES      1
 #define NKL3_KIMG_ENTRIES      1
-#define NKL2_KIMG_ENTRIES      10
+#define NKL2_KIMG_ENTRIES      16
 
 /*
  * Since kva space is below the kernel in its entirety, we start off



Home | Main Index | Thread Index | Old Index