Lines Matching +full:xlen +full:- +full:1
1 // SPDX-License-Identifier: GPL-2.0-only
7 * GK 2/5/95 - Changed to support mounting root fs via NFS
9 * Moan early if gcc is old, avoiding bogus kernels - Paul Gortmaker, May '96
122 * two things - IRQ must not be enabled before the flag is cleared and some
132 * Boot command-line arguments
140 /* Untouched command line saved by arch-specific code. */
185 reset_devices = 1; in set_reset_devices()
186 return 1; in set_reset_devices()
202 int n = strlen(p->str); in obsolete_checksetup()
203 if (parameqn(line, p->str, n)) { in obsolete_checksetup()
204 if (p->early) { in obsolete_checksetup()
211 } else if (!p->setup_func) { in obsolete_checksetup()
213 p->str); in obsolete_checksetup()
215 } else if (p->setup_func(line + n)) in obsolete_checksetup()
228 unsigned long loops_per_jiffy = (1<<12);
260 return -EINVAL; in loglevel()
276 data = (char *)initrd_end - BOOTCONFIG_MAGIC_LEN; in get_boot_config_from_initrd()
284 data--; in get_boot_config_from_initrd()
289 hdr = (u32 *)(data - 8); in get_boot_config_from_initrd()
291 csum = le32_to_cpu(hdr[1]); in get_boot_config_from_initrd()
293 data = ((void *)hdr) - size; in get_boot_config_from_initrd()
296 size, initrd_end - initrd_start); in get_boot_config_from_initrd()
323 #define rest(dst, end) ((end) > (dst) ? (end) - (dst) : 0)
362 return buf - (end - size); in xbc_snprint_cmdline()
382 new_cmdline = memblock_alloc(len + 1, SMP_CACHE_BYTES); in xbc_make_cmdline()
388 ret = xbc_snprint_cmdline(new_cmdline, len + 1, root); in xbc_make_cmdline()
391 memblock_free(new_cmdline, len + 1); in xbc_make_cmdline()
434 /* parse_args() stops at the next param of '--' and returns an address */ in setup_boot_config()
436 initargs_offs = err - tmp_cmdline; in setup_boot_config()
506 if (val == param+strlen(param)+1) in repair_env_string()
507 val[-1] = '='; in repair_env_string()
509 val[-2] = '='; in repair_env_string()
510 memmove(val-1, val, strlen(val)+1); in repair_env_string()
516 /* Anything after -- gets handed straight to init. */
553 /* Handle obsolete-style parameters */ in unknown_bootoption()
572 if (!strncmp(param, envp_init[i], len+1)) in unknown_bootoption()
601 for (i = 1; i < MAX_INIT_ARGS; i++) in init_setup()
603 return 1; in init_setup()
613 for (i = 1; i < MAX_INIT_ARGS; i++) in rdinit_setup()
615 return 1; in rdinit_setup()
632 size_t len, xlen = 0, ilen = 0; in setup_command_line() local
635 xlen = strlen(extra_command_line); in setup_command_line()
638 ilen = strlen(extra_init_args) + 4; /* for " -- " */ in setup_command_line()
641 len = xlen + strlen(boot_command_line) + ilen + 1; in setup_command_line()
647 len = xlen + strlen(command_line) + 1; in setup_command_line()
653 if (xlen) { in setup_command_line()
662 strcpy(saved_command_line + xlen, boot_command_line); in setup_command_line()
663 strcpy(static_command_line + xlen, command_line); in setup_command_line()
671 * " -- "[bootconfig init-param][cmdline init-param] in setup_command_line()
674 len = xlen + initargs_offs; in setup_command_line()
676 len += ilen - 4; /* strlen(extra_init_args) */ in setup_command_line()
678 boot_command_line + initargs_offs - 1); in setup_command_line()
681 strcpy(saved_command_line + len, " -- "); in setup_command_line()
691 * We need to finalize in a non-__init function or else race conditions
696 * gcc-3.4 accidentally inlines this function, so use noinline.
708 * We need to spawn init first so that it obtains pid 1, however in rest_init()
720 tsk->flags |= PF_NO_SETAFFINITY; in rest_init()
757 if ((p->early && parameq(param, p->str)) || in do_early_param()
759 strcmp(p->str, "earlycon") == 0) in do_early_param()
761 if (p->setup_func(val) != 0) in do_early_param()
787 done = 1; in parse_early_param()
853 if (panic_later || (!argv_init[1] && !envp_init[2])) in print_unknown_bootoptions()
860 len = 1; /* null terminator */ in print_unknown_bootoptions()
861 for (p = &argv_init[1]; *p; p++) { in print_unknown_bootoptions()
878 for (p = &argv_init[1]; *p; p++) in print_unknown_bootoptions()
883 /* Start at unknown_options[1] to skip the initial space */ in print_unknown_bootoptions()
885 &unknown_options[1]); in print_unknown_bootoptions()
934 smp_prepare_boot_cpu(); /* arch-specific boot-cpu hooks */ in start_kernel()
943 __stop___param - __start___param, in start_kernel()
944 -1, -1, NULL, &unknown_bootoption); in start_kernel()
947 parse_args("Setting init args", after_dashes, NULL, 0, -1, -1, in start_kernel()
951 NULL, 0, -1, -1, NULL, set_init_arg); in start_kernel()
953 /* Architectural and non-timekeeping rng init, before allocator init */ in start_kernel()
974 * time - but meanwhile we still have a functioning scheduler. in start_kernel()
986 * workqueue to take non-housekeeping into account. in start_kernel()
1049 * to self-test [hard/soft]-irqs on/off lock inversion bugs in start_kernel()
1057 pr_crit("initrd overwritten (0x%08lx < 0x%08lx) - disabling it.\n", in start_kernel()
1104 /* Do the rest non-__init'ed, we're now alive */ in start_kernel()
1108 * Avoid stack canaries in callers of boot_init_stack_canary for gcc-10 in start_kernel()
1122 * cannot do it again - but we do need CONFIG_CONSTRUCTORS in do_ctors()
1146 /* str argument is a comma-separated list of functions */ in initcall_blacklist()
1156 entry->buf = memblock_alloc(strlen(str_entry) + 1, in initcall_blacklist()
1158 if (!entry->buf) in initcall_blacklist()
1160 __func__, strlen(str_entry) + 1); in initcall_blacklist()
1161 strcpy(entry->buf, str_entry); in initcall_blacklist()
1162 list_add(&entry->next, &blacklisted_initcalls); in initcall_blacklist()
1166 return 1; in initcall_blacklist()
1183 * displayed for built-in init functions. Strip off the [module_name]. in initcall_blacklisted()
1188 if (!strcmp(fn_name, entry->buf)) { in initcall_blacklisted()
1266 return -EPERM; in do_one_initcall()
1325 __stop___param - __start___param, in do_initcall_level()
1330 for (fn = initcall_levels[level]; fn < initcall_levels[level+1]; fn++) in do_initcall_level()
1337 size_t len = saved_command_line_len + 1; in do_initcalls()
1344 for (level = 0; level < ARRAY_SIZE(initcall_levels) - 1; level++) { in do_initcalls()
1399 if (ret && ret != -ENOENT) { in try_to_run_init_process()
1465 * Wait until kthreadd is all set-up. in kernel_init()
1482 * Kernel mappings are now finalized - update the userspace page-table in kernel_init()
1532 "See Linux Documentation/admin-guide/init.rst for guidance."); in kernel_init()
1599 * initmem segments and start the user-mode stuff.. in kernel_init_freeable()