arch/mips/fw/arc/cmdline.c
Source file repositories/reference/linux-study-clean/arch/mips/fw/arc/cmdline.c
File Facts
- System
- Linux kernel
- Corpus path
arch/mips/fw/arc/cmdline.c- Extension
.c- Size
- 2371 bytes
- Lines
- 115
- Domain
- Architecture Layer
- Bucket
- arch/mips
- Inferred role
- Architecture Layer: implementation source
- Status
- source implementation candidate
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
Dependency Surface
linux/bug.hlinux/init.hlinux/kernel.hlinux/string.hasm/sgialib.hasm/bootinfo.h
Detected Declarations
function prom_init_cmdline
Annotated Snippet
if (!strncmp(prom_argv(actr), used_arc[i][0], len)) {
/* Ok, we want it. First append the replacement... */
strcat(cp, used_arc[i][1]);
cp += strlen(used_arc[i][1]);
/* ... and now the argument */
s = strchr(prom_argv(actr), '=');
if (s) {
s++;
len = strlen(s);
memcpy(cp, s, len + 1);
cp += len;
}
*cp++ = ' ';
break;
}
}
actr++;
}
return cp;
}
void __init prom_init_cmdline(int argc, LONG *argv)
{
char *cp;
int actr, i;
size_t len;
actr = 1; /* Always ignore argv[0] */
cp = arcs_cmdline;
/*
* Move ARC variables to the beginning to make sure they can be
* overridden by later arguments.
*/
cp = move_firmware_args(argc, argv, cp);
while (actr < argc) {
for (i = 0; i < ARRAY_SIZE(ignored); i++) {
len = strlen(ignored[i]);
if (!strncmp(prom_argv(actr), ignored[i], len))
goto pic_cont;
}
/* Ok, we want it. */
len = strlen(prom_argv(actr));
memcpy(cp, prom_argv(actr), len + 1);
cp += len;
*cp++ = ' ';
pic_cont:
actr++;
}
if (cp != arcs_cmdline) /* get rid of trailing space */
--cp;
*cp = '\0';
#ifdef DEBUG_CMDLINE
pr_debug("prom cmdline: %s\n", arcs_cmdline);
#endif
}
Annotation
- Immediate include surface: `linux/bug.h`, `linux/init.h`, `linux/kernel.h`, `linux/string.h`, `asm/sgialib.h`, `asm/bootinfo.h`.
- Detected declarations: `function prom_init_cmdline`.
- Atlas domain: Architecture Layer / arch/mips.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.