arch/parisc/kernel/setup.c
Source file repositories/reference/linux-study-clean/arch/parisc/kernel/setup.c
File Facts
- System
- Linux kernel
- Corpus path
arch/parisc/kernel/setup.c- Extension
.c- Size
- 7953 bytes
- Lines
- 312
- Domain
- Architecture Layer
- Bucket
- arch/parisc
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hlinux/initrd.hlinux/init.hlinux/console.hlinux/seq_file.hlinux/pci.hlinux/proc_fs.hlinux/export.hlinux/sched.hlinux/sched/clock.hlinux/start_kernel.hasm/cacheflush.hasm/processor.hasm/sections.hasm/pdc.hasm/led.hasm/pdc_chassis.hasm/io.hasm/setup.hasm/unwind.hasm/smp.h
Detected Declarations
function setup_cmdlinefunction dma_ops_initfunction setup_archfunction c_startfunction c_nextfunction c_stopfunction parisc_init_resourcesfunction parisc_initfunction start_parisc
Annotated Snippet
#include <linux/start_kernel.h>
#include <asm/cacheflush.h>
#include <asm/processor.h>
#include <asm/sections.h>
#include <asm/pdc.h>
#include <asm/led.h>
#include <asm/pdc_chassis.h>
#include <asm/io.h>
#include <asm/setup.h>
#include <asm/unwind.h>
#include <asm/smp.h>
static char __initdata command_line[COMMAND_LINE_SIZE];
static void __init setup_cmdline(char **cmdline_p)
{
extern unsigned int boot_args[];
char *p;
*cmdline_p = command_line;
/* boot_args[0] is free-mem start, boot_args[1] is ptr to command line */
if (boot_args[0] < 64)
return; /* return if called from hpux boot loader */
/* Collect stuff passed in from the boot loader */
strscpy(boot_command_line, (char *)__va(boot_args[1]),
COMMAND_LINE_SIZE);
/* autodetect console type (if not done by palo yet) */
p = boot_command_line;
if (!str_has_prefix(p, "console=") && !strstr(p, " console=")) {
strlcat(p, " console=", COMMAND_LINE_SIZE);
if (PAGE0->mem_cons.cl_class == CL_DUPLEX)
strlcat(p, "ttyS0", COMMAND_LINE_SIZE);
else
strlcat(p, "tty0", COMMAND_LINE_SIZE);
}
/* default to use early console */
if (!strstr(p, "earlycon"))
strlcat(p, " earlycon=pdc", COMMAND_LINE_SIZE);
#ifdef CONFIG_BLK_DEV_INITRD
/* did palo pass us a ramdisk? */
if (boot_args[2] != 0) {
initrd_start = (unsigned long)__va(boot_args[2]);
initrd_end = (unsigned long)__va(boot_args[3]);
}
#endif
strscpy(command_line, boot_command_line, COMMAND_LINE_SIZE);
}
#ifdef CONFIG_PA11
static void __init dma_ops_init(void)
{
switch (boot_cpu_data.cpu_type) {
case pcx:
/*
* We've got way too many dependencies on 1.1 semantics
* to support 1.0 boxes at this point.
*/
panic( "PA-RISC Linux currently only supports machines that conform to\n"
"the PA-RISC 1.1 or 2.0 architecture specification.\n");
case pcxl2:
default:
break;
}
}
#endif
void __init setup_arch(char **cmdline_p)
{
unwind_init();
init_per_cpu(smp_processor_id()); /* Set Modes & Enable FP */
#ifdef CONFIG_64BIT
printk(KERN_INFO "The 64-bit Kernel has started...\n");
#else
printk(KERN_INFO "The 32-bit Kernel has started...\n");
#endif
printk(KERN_INFO "Kernel default page size is %d KB. Huge pages ",
(int)(PAGE_SIZE / 1024));
#ifdef CONFIG_HUGETLB_PAGE
printk(KERN_CONT "enabled with %d MB physical and %d MB virtual size",
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/initrd.h`, `linux/init.h`, `linux/console.h`, `linux/seq_file.h`, `linux/pci.h`, `linux/proc_fs.h`, `linux/export.h`.
- Detected declarations: `function setup_cmdline`, `function dma_ops_init`, `function setup_arch`, `function c_start`, `function c_next`, `function c_stop`, `function parisc_init_resources`, `function parisc_init`, `function start_parisc`.
- Atlas domain: Architecture Layer / arch/parisc.
- 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.