arch/mips/loongson2ef/common/env.c
Source file repositories/reference/linux-study-clean/arch/mips/loongson2ef/common/env.c
File Facts
- System
- Linux kernel
- Corpus path
arch/mips/loongson2ef/common/env.c- Extension
.c- Size
- 1296 bytes
- Lines
- 54
- Domain
- Architecture Layer
- Bucket
- arch/mips
- 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.
Dependency Surface
linux/export.hasm/bootinfo.hasm/fw/fw.hloongson.h
Detected Declarations
function prom_init_envexport cpu_clock_freq
Annotated Snippet
switch (processor_id & PRID_REV_MASK) {
case PRID_REV_LOONGSON2E:
cpu_clock_freq = 533080000;
break;
case PRID_REV_LOONGSON2F:
cpu_clock_freq = 797000000;
break;
default:
cpu_clock_freq = 100000000;
break;
}
}
pr_info("CpuClock = %u\n", cpu_clock_freq);
}
Annotation
- Immediate include surface: `linux/export.h`, `asm/bootinfo.h`, `asm/fw/fw.h`, `loongson.h`.
- Detected declarations: `function prom_init_env`, `export cpu_clock_freq`.
- Atlas domain: Architecture Layer / arch/mips.
- 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.