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;
186 return 1;
202 int n = strlen(p->str);
203 if (parameqn(line, p->str, n)) {
204 if (p->early) {
211 } else if (!p->setup_func) {
213 p->str);
215 } else if (p->setup_func(line + n))
228 unsigned long loops_per_jiffy = (1<<12);
260 return -EINVAL;
276 data = (char *)initrd_end - BOOTCONFIG_MAGIC_LEN;
284 data--;
289 hdr = (u32 *)(data - 8);
291 csum = le32_to_cpu(hdr[1]);
293 data = ((void *)hdr) - size;
296 size, initrd_end - initrd_start);
323 #define rest(dst, end) ((end) > (dst) ? (end) - (dst) : 0)
362 return buf - (end - size);
382 new_cmdline = memblock_alloc(len + 1, SMP_CACHE_BYTES);
388 ret = xbc_snprint_cmdline(new_cmdline, len + 1, root);
391 memblock_free(new_cmdline, len + 1);
434 /* parse_args() stops at the next param of '--' and returns an address */
436 initargs_offs = err - tmp_cmdline;
506 if (val == param+strlen(param)+1)
507 val[-1] = '=';
509 val[-2] = '=';
510 memmove(val-1, val, strlen(val)+1);
516 /* Anything after -- gets handed straight to init. */
553 /* Handle obsolete-style parameters */
572 if (!strncmp(param, envp_init[i], len+1))
601 for (i = 1; i < MAX_INIT_ARGS; i++)
603 return 1;
613 for (i = 1; i < MAX_INIT_ARGS; i++)
615 return 1;
632 size_t len, xlen = 0, ilen = 0;
635 xlen = strlen(extra_command_line);
638 ilen = strlen(extra_init_args) + 4; /* for " -- " */
641 len = xlen + strlen(boot_command_line) + ilen + 1;
645 len = xlen + strlen(command_line) + 1;
649 if (xlen) {
658 strcpy(saved_command_line + xlen, boot_command_line);
659 strcpy(static_command_line + xlen, command_line);
667 * " -- "[bootconfig init-param][cmdline init-param]
670 len = xlen + initargs_offs;
672 len += ilen - 4; /* strlen(extra_init_args) */
674 boot_command_line + initargs_offs - 1);
677 strcpy(saved_command_line + len, " -- ");
687 * We need to finalize in a non-__init function or else race conditions
692 * gcc-3.4 accidentally inlines this function, so use noinline.
704 * We need to spawn init first so that it obtains pid 1, however
716 tsk->flags |= PF_NO_SETAFFINITY;
753 if (p->early && parameq(param, p->str)) {
754 if (p->setup_func(val) != 0)
780 done = 1;
846 if (panic_later || (!argv_init[1] && !envp_init[2]))
853 len = 1; /* null terminator */
854 for (p = &argv_init[1]; *p; p++) {
871 for (p = &argv_init[1]; *p; p++)
876 /* Start at unknown_options[1] to skip the initial space */
878 &unknown_options[1]);
927 smp_prepare_boot_cpu(); /* arch-specific boot-cpu hooks */
936 __stop___param - __start___param,
937 -1, -1, NULL, &unknown_bootoption);
940 parse_args("Setting init args", after_dashes, NULL, 0, -1, -1,
944 NULL, 0, -1, -1, NULL, set_init_arg);
946 /* Architectural and non-timekeeping rng init, before allocator init */
967 * time - but meanwhile we still have a functioning scheduler.
979 * workqueue to take non-housekeeping into account.
1043 * to self-test [hard/soft]-irqs on/off lock inversion bugs
1051 pr_crit("initrd overwritten (0x%08lx < 0x%08lx) - disabling it.\n",
1098 /* Do the rest non-__init'ed, we're now alive */
1102 * Avoid stack canaries in callers of boot_init_stack_canary for gcc-10
1116 * cannot do it again - but we do need CONFIG_CONSTRUCTORS
1140 /* str argument is a comma-separated list of functions */
1147 entry->buf = memblock_alloc_or_panic(strlen(str_entry) + 1,
1149 strcpy(entry->buf, str_entry);
1150 list_add(&entry->next, &blacklisted_initcalls);
1154 return 1;
1171 * displayed for built-in init functions. Strip off the [module_name].
1176 if (!strcmp(fn_name, entry->buf)) {
1254 return -EPERM;
1313 __stop___param - __start___param,
1318 for (fn = initcall_levels[level]; fn < initcall_levels[level+1]; fn++)
1325 size_t len = saved_command_line_len + 1;
1332 for (level = 0; level < ARRAY_SIZE(initcall_levels) - 1; level++) {
1387 if (ret && ret != -ENOENT) {
1453 * Wait until kthreadd is all set-up.
1470 * Kernel mappings are now finalized - update the userspace page-table
1520 "See Linux Documentation/admin-guide/init.rst for guidance.");
1587 * initmem segments and start the user-mode stuff..