+
+#if CONFIG_JETSAM && (DEVELOPMENT || DEBUG)
+ if (PE_parse_boot_argn("-no_vnode_jetsam", namep, sizeof(namep)))
+ bootarg_no_vnode_jetsam = 1;
+#endif /* CONFIG_JETSAM && (DEVELOPMENT || DEBUG) */
+
+
+#if CONFIG_EMBEDDED
+ /*
+ * The darkboot flag is specified by the bootloader and is stored in
+ * boot_args->bootFlags. This flag is available starting revision 2.
+ */
+ boot_args *args = (boot_args *) PE_state.bootArgs;
+ if ((args != NULL) && (args->Revision >= kBootArgsRevision2)) {
+ darkboot = (args->bootFlags & kBootFlagsDarkBoot) ? 1 : 0;
+ } else {
+ darkboot = 0;
+ }
+#endif
+
+#if PROC_REF_DEBUG
+ if (PE_parse_boot_argn("-disable_procref_tracking", namep, sizeof(namep))) {
+ proc_ref_tracking_disabled = 1;
+ }
+#endif
+
+#if OS_REASON_DEBUG
+ if (PE_parse_boot_argn("-disable_osreason_debug", namep, sizeof(namep))) {
+ os_reason_debug_disabled = 1;
+ }
+#endif
+
+ PE_parse_boot_argn("sigrestrict", &sigrestrict_arg, sizeof(sigrestrict_arg));
+
+#if DEVELOPMENT|| DEBUG
+ if (PE_parse_boot_argn("-no_sigsys", namep, sizeof(namep))) {
+ send_sigsys = false;
+ }
+#endif
+
+#if (DEVELOPMENT|| DEBUG)
+ if (PE_parse_boot_argn("alt-dyld", dyld_alt_path, sizeof(dyld_alt_path))) {
+ if (strlen(dyld_alt_path) > 0) {
+ use_alt_dyld = 1;
+ }
+ }
+#endif
+}
+
+void
+bsd_exec_setup(int scale)
+{
+
+ switch (scale) {
+ case 0:
+ case 1:
+ bsd_simul_execs = BSD_SIMUL_EXECS;
+ break;
+ case 2:
+ case 3:
+ bsd_simul_execs = 65;
+ break;
+ case 4:
+ case 5:
+ bsd_simul_execs = 129;
+ break;
+ case 6:
+ case 7:
+ bsd_simul_execs = 257;
+ break;
+ default:
+ bsd_simul_execs = 513;
+ break;
+
+ }
+ bsd_pageable_map_size = (bsd_simul_execs * BSD_PAGEABLE_SIZE_PER_EXEC);