arch/arm64/include/asm/archrandom.h
Source file repositories/reference/linux-study-clean/arch/arm64/include/asm/archrandom.h
File Facts
- System
- Linux kernel
- Corpus path
arch/arm64/include/asm/archrandom.h- Extension
.h- Size
- 3065 bytes
- Lines
- 133
- Domain
- Architecture Layer
- Bucket
- arch/arm64
- 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/arm-smccc.hlinux/bug.hlinux/kernel.hlinux/irqflags.hasm/cpufeature.h
Detected Declarations
function smccc_probe_trngfunction __arm64_rndrfunction __arm64_rndrrsfunction __cpu_has_rngfunction arch_get_random_longsfunction arch_get_random_seed_longsfunction __early_cpu_has_rndr
Annotated Snippet
if ((int)res.a0 >= 0) {
switch (max_longs) {
case 3:
*v++ = res.a1;
fallthrough;
case 2:
*v++ = res.a2;
fallthrough;
case 1:
*v++ = res.a3;
break;
}
return max_longs;
}
}
/*
* RNDRRS is not backed by an entropy source but by a DRBG that is
* reseeded after each invocation. This is not a 100% fit but good
* enough to implement this API if no other entropy source exists.
*/
if (__cpu_has_rng() && __arm64_rndrrs(v))
return 1;
return 0;
}
static inline bool __init __early_cpu_has_rndr(void)
{
/* Open code as we run prior to the first call to cpufeature. */
unsigned long ftr = read_sysreg_s(SYS_ID_AA64ISAR0_EL1);
return (ftr >> ID_AA64ISAR0_EL1_RNDR_SHIFT) & 0xf;
}
#endif /* _ASM_ARCHRANDOM_H */
Annotation
- Immediate include surface: `linux/arm-smccc.h`, `linux/bug.h`, `linux/kernel.h`, `linux/irqflags.h`, `asm/cpufeature.h`.
- Detected declarations: `function smccc_probe_trng`, `function __arm64_rndr`, `function __arm64_rndrrs`, `function __cpu_has_rng`, `function arch_get_random_longs`, `function arch_get_random_seed_longs`, `function __early_cpu_has_rndr`.
- Atlas domain: Architecture Layer / arch/arm64.
- 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.