summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2009-05-29 05:37:27 +0000
committerdelphij <delphij@FreeBSD.org>2009-05-29 05:37:27 +0000
commit2095d11d4e693197f9de001e1fc300afcd8229c3 (patch)
tree56f7fad34a05d182f3fb96ad2160f36743e3cc1a
parente05714ba705cb30431ac886d3e60ebd247b1d87b (diff)
downloadFreeBSD-src-2095d11d4e693197f9de001e1fc300afcd8229c3.zip
FreeBSD-src-2095d11d4e693197f9de001e1fc300afcd8229c3.tar.gz
Add new sysconfig bits, Fix the bogus numbering of the old bits.
Submitted by: "Pedro f. Giffuni" <giffunip asme org> Obtained from: NetBSD PR: kern/91293
-rw-r--r--sys/compat/svr4/svr4_misc.c43
-rw-r--r--sys/compat/svr4/svr4_sysconfig.h48
2 files changed, 71 insertions, 20 deletions
diff --git a/sys/compat/svr4/svr4_misc.c b/sys/compat/svr4/svr4_misc.c
index fbbebb6..ac3dbaa 100644
--- a/sys/compat/svr4/svr4_misc.c
+++ b/sys/compat/svr4/svr4_misc.c
@@ -706,9 +706,6 @@ svr4_sys_sysconfig(td, uap)
retval = &(td->td_retval[0]);
switch (uap->name) {
- case SVR4_CONFIG_UNUSED:
- *retval = 0;
- break;
case SVR4_CONFIG_NGROUPS:
*retval = NGROUPS_MAX;
break;
@@ -788,7 +785,45 @@ svr4_sys_sysconfig(td, uap)
#endif
break;
#endif /* NOTYET */
-
+ case SVR4_CONFIG_COHERENCY:
+ *retval = 0; /* XXX */
+ break;
+ case SVR4_CONFIG_SPLIT_CACHE:
+ *retval = 0; /* XXX */
+ break;
+ case SVR4_CONFIG_ICACHESZ:
+ *retval = 256; /* XXX */
+ break;
+ case SVR4_CONFIG_DCACHESZ:
+ *retval = 256; /* XXX */
+ break;
+ case SVR4_CONFIG_ICACHELINESZ:
+ *retval = 64; /* XXX */
+ break;
+ case SVR4_CONFIG_DCACHELINESZ:
+ *retval = 64; /* XXX */
+ break;
+ case SVR4_CONFIG_ICACHEBLKSZ:
+ *retval = 64; /* XXX */
+ break;
+ case SVR4_CONFIG_DCACHEBLKSZ:
+ *retval = 64; /* XXX */
+ break;
+ case SVR4_CONFIG_DCACHETBLKSZ:
+ *retval = 64; /* XXX */
+ break;
+ case SVR4_CONFIG_ICACHE_ASSOC:
+ *retval = 1; /* XXX */
+ break;
+ case SVR4_CONFIG_DCACHE_ASSOC:
+ *retval = 1; /* XXX */
+ break;
+ case SVR4_CONFIG_MAXPID:
+ *retval = PID_MAX;
+ break;
+ case SVR4_CONFIG_STACK_PROT:
+ *retval = PROT_READ|PROT_WRITE|PROT_EXEC;
+ break;
default:
return EINVAL;
}
diff --git a/sys/compat/svr4/svr4_sysconfig.h b/sys/compat/svr4/svr4_sysconfig.h
index b88fe19..4a26545 100644
--- a/sys/compat/svr4/svr4_sysconfig.h
+++ b/sys/compat/svr4/svr4_sysconfig.h
@@ -31,7 +31,7 @@
#ifndef _SVR4_SYSCONFIG_H_
#define _SVR4_SYSCONFIG_H_
-#define SVR4_CONFIG_UNUSED 0x01
+#define SVR4_CONFIG_UNUSED_1 0x01
#define SVR4_CONFIG_NGROUPS 0x02
#define SVR4_CONFIG_CHILD_MAX 0x03
#define SVR4_CONFIG_OPEN_FILES 0x04
@@ -43,20 +43,36 @@
#define SVR4_CONFIG_PROF_TCK 0x0a
#define SVR4_CONFIG_NPROC_CONF 0x0b
#define SVR4_CONFIG_NPROC_ONLN 0x0c
-#define SVR4_CONFIG_AIO_LISTIO_MAX 0x0e
-#define SVR4_CONFIG_AIO_MAX 0x0f
-#define SVR4_CONFIG_AIO_PRIO_DELTA_MAX 0x10
-#define SVR4_CONFIG_DELAYTIMER_MAX 0x11
-#define SVR4_CONFIG_MQ_OPEN_MAX 0x12
-#define SVR4_CONFIG_MQ_PRIO_MAX 0x13
-#define SVR4_CONFIG_RTSIG_MAX 0x14
-#define SVR4_CONFIG_SEM_NSEMS_MAX 0x15
-#define SVR4_CONFIG_SEM_VALUE_MAX 0x16
-#define SVR4_CONFIG_SIGQUEUE_MAX 0x17
-#define SVR4_CONFIG_SIGRT_MIN 0x18
-#define SVR4_CONFIG_SIGRT_MAX 0x19
-#define SVR4_CONFIG_TIMER_MAX 0x20
-#define SVR4_CONFIG_PHYS_PAGES 0x21
-#define SVR4_CONFIG_AVPHYS_PAGES 0x22
+#define SVR4_CONFIG_AIO_LISTIO_MAX 0x0d
+#define SVR4_CONFIG_AIO_MAX 0x0e
+#define SVR4_CONFIG_AIO_PRIO_DELTA_MAX 0x0f
+#define SVR4_CONFIG_DELAYTIMER_MAX 0x10
+#define SVR4_CONFIG_MQ_OPEN_MAX 0x11
+#define SVR4_CONFIG_MQ_PRIO_MAX 0x12
+#define SVR4_CONFIG_RTSIG_MAX 0x13
+#define SVR4_CONFIG_SEM_NSEMS_MAX 0x14
+#define SVR4_CONFIG_SEM_VALUE_MAX 0x15
+#define SVR4_CONFIG_SIGQUEUE_MAX 0x16
+#define SVR4_CONFIG_SIGRT_MIN 0x17
+#define SVR4_CONFIG_SIGRT_MAX 0x18
+#define SVR4_CONFIG_TIMER_MAX 0x19
+#define SVR4_CONFIG_PHYS_PAGES 0x1a
+#define SVR4_CONFIG_AVPHYS_PAGES 0x1b
+#define SVR4_CONFIG_COHERENCY 0x1c
+#define SVR4_CONFIG_SPLIT_CACHE 0x1d
+#define SVR4_CONFIG_ICACHESZ 0x1e
+#define SVR4_CONFIG_DCACHESZ 0x1f
+#define SVR4_CONFIG_ICACHELINESZ 0x20
+#define SVR4_CONFIG_DCACHELINESZ 0x21
+#define SVR4_CONFIG_ICACHEBLKSZ 0x22
+#define SVR4_CONFIG_DCACHEBLKSZ 0x23
+#define SVR4_CONFIG_DCACHETBLKSZ 0x24
+#define SVR4_CONFIG_ICACHE_ASSOC 0x25
+#define SVR4_CONFIG_DCACHE_ASSOC 0x26
+#define SVR4_CONFIG_UNUSED_2 0x27
+#define SVR4_CONFIG_UNUSED_3 0x28
+#define SVR4_CONFIG_UNUSED_4 0x29
+#define SVR4_CONFIG_MAXPID 0x2a
+#define SVR4_CONFIG_STACK_PROT 0x2b
#endif /* !_SVR4_SYSCONFIG_H_ */
OpenPOWER on IntegriCloud