include/linux/firmware/trusted_foundations.h
Source file repositories/reference/linux-study-clean/include/linux/firmware/trusted_foundations.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/firmware/trusted_foundations.h- Extension
.h- Size
- 2559 bytes
- Lines
- 93
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/printk.hlinux/bug.hlinux/of.hlinux/cpu.hlinux/smp.hlinux/types.hasm/hardware/cache-l2x0.hasm/outercache.h
Detected Declarations
struct trusted_foundations_platform_datafunction tf_dummy_write_secfunction of_register_trusted_foundationsfunction trusted_foundations_registered
Annotated Snippet
struct trusted_foundations_platform_data {
unsigned int version_major;
unsigned int version_minor;
};
#if IS_ENABLED(CONFIG_TRUSTED_FOUNDATIONS)
void register_trusted_foundations(struct trusted_foundations_platform_data *pd);
void of_register_trusted_foundations(void);
bool trusted_foundations_registered(void);
#else /* CONFIG_TRUSTED_FOUNDATIONS */
static inline void tf_dummy_write_sec(unsigned long val, unsigned int reg)
{
}
static inline void register_trusted_foundations(
struct trusted_foundations_platform_data *pd)
{
/*
* If the system requires TF and we cannot provide it, continue booting
* but disable features that cannot be provided.
*/
pr_err("No support for Trusted Foundations, continuing in degraded mode.\n");
pr_err("Secondary processors as well as CPU PM will be disabled.\n");
#if IS_ENABLED(CONFIG_CACHE_L2X0)
pr_err("L2X0 cache will be kept disabled.\n");
outer_cache.write_sec = tf_dummy_write_sec;
#endif
#if IS_ENABLED(CONFIG_SMP)
setup_max_cpus = 0;
#endif
cpu_idle_poll_ctrl(true);
}
static inline void of_register_trusted_foundations(void)
{
struct device_node *np = of_find_compatible_node(NULL, NULL, "tlm,trusted-foundations");
if (!np)
return;
of_node_put(np);
/*
* If we find the target should enable TF but does not support it,
* fail as the system won't be able to do much anyway
*/
register_trusted_foundations(NULL);
}
static inline bool trusted_foundations_registered(void)
{
return false;
}
#endif /* CONFIG_TRUSTED_FOUNDATIONS */
#endif
Annotation
- Immediate include surface: `linux/printk.h`, `linux/bug.h`, `linux/of.h`, `linux/cpu.h`, `linux/smp.h`, `linux/types.h`, `asm/hardware/cache-l2x0.h`, `asm/outercache.h`.
- Detected declarations: `struct trusted_foundations_platform_data`, `function tf_dummy_write_sec`, `function of_register_trusted_foundations`, `function trusted_foundations_registered`.
- Atlas domain: Core OS / Core Kernel Interface.
- 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.