arch/um/kernel/initrd.c
Source file repositories/reference/linux-study-clean/arch/um/kernel/initrd.c
File Facts
- System
- Linux kernel
- Corpus path
arch/um/kernel/initrd.c- Extension
.c- Size
- 910 bytes
- Lines
- 47
- Domain
- Architecture Layer
- Bucket
- arch/um
- 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/init.hlinux/memblock.hlinux/initrd.hasm/types.hinit.hos.hum_arch.h
Detected Declarations
function read_initrdfunction uml_initrd_setup
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
*/
#include <linux/init.h>
#include <linux/memblock.h>
#include <linux/initrd.h>
#include <asm/types.h>
#include <init.h>
#include <os.h>
#include "um_arch.h"
/* Changed by uml_initrd_setup, which is a setup */
static char *initrd __initdata = NULL;
int __init read_initrd(void)
{
unsigned long long size;
void *area;
if (!initrd)
return 0;
area = uml_load_file(initrd, &size);
if (!area)
return 0;
initrd_start = (unsigned long) area;
initrd_end = initrd_start + size;
return 0;
}
static int __init uml_initrd_setup(char *line, int *add)
{
*add = 0;
initrd = line;
return 0;
}
__uml_setup("initrd=", uml_initrd_setup,
"initrd=<initrd image>\n"
" This is used to boot UML from an initrd image. The argument is the\n"
" name of the file containing the image.\n\n"
);
Annotation
- Immediate include surface: `linux/init.h`, `linux/memblock.h`, `linux/initrd.h`, `asm/types.h`, `init.h`, `os.h`, `um_arch.h`.
- Detected declarations: `function read_initrd`, `function uml_initrd_setup`.
- Atlas domain: Architecture Layer / arch/um.
- 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.