arch/arm/kernel/setup.c
Source file repositories/reference/linux-study-clean/arch/arm/kernel/setup.c
File Facts
- System
- Linux kernel
- Corpus path
arch/arm/kernel/setup.c- Extension
.c- Size
- 32601 bytes
- Lines
- 1346
- Domain
- Architecture Layer
- Bucket
- arch/arm
- Inferred role
- Architecture Layer: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/efi.hlinux/export.hlinux/kernel.hlinux/stddef.hlinux/ioport.hlinux/delay.hlinux/utsname.hlinux/initrd.hlinux/console.hlinux/seq_file.hlinux/screen_info.hlinux/init.hlinux/kexec.hlinux/libfdt.hlinux/of.hlinux/of_fdt.hlinux/cpu.hlinux/interrupt.hlinux/smp.hlinux/proc_fs.hlinux/memblock.hlinux/bug.hlinux/compiler.hlinux/sort.hlinux/psci.hasm/unified.hasm/cp15.hasm/cpu.hasm/cputype.hasm/efi.hasm/elf.hasm/early_ioremap.h
Detected Declarations
struct stackfunction fpe_setupfunction __get_cpu_architecturefunction __get_cpu_architecturefunction cpu_architecturefunction cpu_has_aliasing_icachefunction cacheid_initfunction early_printfunction sdiv_instructionfunction udiv_instructionfunction bx_lr_instructionfunction patch_aeabi_idivfunction patch_aeabi_idivfunction elf_hwcap_fixupfunction cpu_initfunction smp_setup_processor_idfunction smp_build_mpidr_hashfunction setup_processorfunction dump_machine_tablefunction arm_add_memoryfunction early_memfunction request_standard_resourcesfunction for_each_mem_rangefunction customize_machinefunction init_machine_latefunction get_total_memfunction reserve_crashkernelfunction reserve_crashkernelfunction arm_restartfunction setup_archfunction arch_cpu_is_hotpluggablefunction proc_cpu_initfunction c_showfunction for_each_online_cpufunction c_stopmodule init proc_cpu_initexport processor_idexport __machine_arch_typeexport cacheidexport system_revexport system_serialexport system_serial_lowexport system_serial_highexport elf_hwcapexport elf_hwcap2export outer_cacheexport elf_platform
Annotated Snippet
struct stack {
u32 irq[4];
u32 abt[4];
u32 und[4];
u32 fiq[4];
} ____cacheline_aligned;
#ifndef CONFIG_CPU_V7M
static struct stack stacks[NR_CPUS];
#endif
char elf_platform[ELF_PLATFORM_SIZE];
EXPORT_SYMBOL(elf_platform);
static const char *cpu_name;
static const char *machine_name;
static char __initdata cmd_line[COMMAND_LINE_SIZE];
const struct machine_desc *machine_desc __initdata;
static union { char c[4]; unsigned long l; } endian_test __initdata = { { 'l', '?', '?', 'b' } };
#define ENDIANNESS ((char)endian_test.l)
DEFINE_PER_CPU(struct cpuinfo_arm, cpu_data);
/*
* Standard memory resources
*/
static struct resource mem_res[] = {
{
.name = "Video RAM",
.start = 0,
.end = 0,
.flags = IORESOURCE_MEM
},
{
.name = "Kernel code",
.start = 0,
.end = 0,
.flags = IORESOURCE_SYSTEM_RAM
},
{
.name = "Kernel data",
.start = 0,
.end = 0,
.flags = IORESOURCE_SYSTEM_RAM
}
};
#define video_ram mem_res[0]
#define kernel_code mem_res[1]
#define kernel_data mem_res[2]
static struct resource io_res[] = {
{
.name = "reserved",
.start = 0x3bc,
.end = 0x3be,
.flags = IORESOURCE_IO | IORESOURCE_BUSY
},
{
.name = "reserved",
.start = 0x378,
.end = 0x37f,
.flags = IORESOURCE_IO | IORESOURCE_BUSY
},
{
.name = "reserved",
.start = 0x278,
.end = 0x27f,
.flags = IORESOURCE_IO | IORESOURCE_BUSY
}
};
#define lp0 io_res[0]
#define lp1 io_res[1]
#define lp2 io_res[2]
static const char *proc_arch[] = {
"undefined/unknown",
"3",
"4",
"4T",
"5",
"5T",
"5TE",
"5TEJ",
"6TEJ",
"7",
"7M",
"?(12)",
Annotation
- Immediate include surface: `linux/efi.h`, `linux/export.h`, `linux/kernel.h`, `linux/stddef.h`, `linux/ioport.h`, `linux/delay.h`, `linux/utsname.h`, `linux/initrd.h`.
- Detected declarations: `struct stack`, `function fpe_setup`, `function __get_cpu_architecture`, `function __get_cpu_architecture`, `function cpu_architecture`, `function cpu_has_aliasing_icache`, `function cacheid_init`, `function early_print`, `function sdiv_instruction`, `function udiv_instruction`.
- Atlas domain: Architecture Layer / arch/arm.
- Implementation status: integration 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.