Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/powerpc Add CPU_EXECPROT sysctl so that atf can ena...



details:   https://anonhg.NetBSD.org/src/rev/255446e18392
branches:  trunk
changeset: 778101:255446e18392
user:      matt <matt%NetBSD.org@localhost>
date:      Fri Mar 16 07:41:54 2012 +0000

description:
Add CPU_EXECPROT sysctl so that atf can enable exec permission tests for
PPC Booke.

diffstat:

 sys/arch/powerpc/include/cpu.h             |   5 +++--
 sys/arch/powerpc/powerpc/powerpc_machdep.c |  11 +++++++++--
 2 files changed, 12 insertions(+), 4 deletions(-)

diffs (50 lines):

diff -r 5ddce3856050 -r 255446e18392 sys/arch/powerpc/include/cpu.h
--- a/sys/arch/powerpc/include/cpu.h    Fri Mar 16 07:23:38 2012 +0000
+++ b/sys/arch/powerpc/include/cpu.h    Fri Mar 16 07:41:54 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.89 2011/12/13 11:03:52 kiyohara Exp $        */
+/*     $NetBSD: cpu.h,v 1.90 2012/03/16 07:41:54 matt Exp $    */
 
 /*
  * Copyright (C) 1999 Wolfgang Solfrank.
@@ -444,6 +444,7 @@
 #define        CPU_POWERSAVE           8       /* int: use CPU powersave mode */
 #define        CPU_BOOTED_DEVICE       9       /* string: device we booted from */
 #define        CPU_BOOTED_KERNEL       10      /* string: kernel we booted */
-#define        CPU_MAXID               11      /* number of valid machdep ids */
+#define        CPU_EXECPROT            11      /* bool: PROT_EXEC works */
+#define        CPU_MAXID               12      /* number of valid machdep ids */
 
 #endif /* _POWERPC_CPU_H_ */
diff -r 5ddce3856050 -r 255446e18392 sys/arch/powerpc/powerpc/powerpc_machdep.c
--- a/sys/arch/powerpc/powerpc/powerpc_machdep.c        Fri Mar 16 07:23:38 2012 +0000
+++ b/sys/arch/powerpc/powerpc/powerpc_machdep.c        Fri Mar 16 07:41:54 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: powerpc_machdep.c,v 1.63 2012/02/19 21:06:24 rmind Exp $       */
+/*     $NetBSD: powerpc_machdep.c,v 1.64 2012/03/16 07:41:55 matt Exp $        */
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: powerpc_machdep.c,v 1.63 2012/02/19 21:06:24 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: powerpc_machdep.c,v 1.64 2012/03/16 07:41:55 matt Exp $");
 
 #include "opt_altivec.h"
 #include "opt_modular.h"
@@ -248,6 +248,13 @@
                       NULL, cpu_altivec, NULL, 0,
                       CTL_MACHDEP, CPU_ALTIVEC, CTL_EOL);
 #endif
+#ifdef PPC_BOOKE
+       sysctl_createv(clog, 0, NULL, NULL,
+                      CTLFLAG_PERMANENT|CTLFLAG_IMMEDIATE,
+                      CTLTYPE_INT, "execprot", NULL,
+                      NULL, 1, NULL, 0,
+                      CTL_MACHDEP, CPU_EXECPROT, CTL_EOL);
+#endif
        sysctl_createv(clog, 0, NULL, NULL,
                       CTLFLAG_PERMANENT,
                       CTLTYPE_STRING, "model", NULL,



Home | Main Index | Thread Index | Old Index