drivers/tee/optee/core.c
Source file repositories/reference/linux-study-clean/drivers/tee/optee/core.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/tee/optee/core.c- Extension
.c- Size
- 6608 bytes
- Lines
- 281
- Domain
- Driver Families
- Bucket
- drivers/tee
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/crash_dump.hlinux/errno.hlinux/io.hlinux/module.hlinux/rpmb.hlinux/slab.hlinux/string.hlinux/tee_core.hlinux/types.hoptee_private.h
Detected Declarations
function rpmb_add_devfunction optee_bus_scan_rpmbfunction optee_rpmb_intf_rdevfunction optee_set_dma_maskfunction optee_get_revisionfunction optee_bus_scanfunction rpmb_routing_model_showfunction optee_set_dev_groupfunction optee_openfunction optee_release_helperfunction list_for_each_entry_safefunction optee_releasefunction optee_release_suppfunction optee_remove_commonfunction optee_core_initfunction optee_core_exitmodule init optee_core_init
Annotated Snippet
module_init(optee_core_init);
static void __exit optee_core_exit(void)
{
if (IS_REACHABLE(CONFIG_RPMB) && intf_is_regged) {
rpmb_interface_unregister(&rpmb_class_intf);
intf_is_regged = false;
}
if (!smc_abi_rc)
optee_smc_abi_unregister();
if (!ffa_abi_rc)
optee_ffa_abi_unregister();
}
module_exit(optee_core_exit);
MODULE_AUTHOR("Linaro");
MODULE_DESCRIPTION("OP-TEE driver");
MODULE_VERSION("1.0");
MODULE_LICENSE("GPL v2");
MODULE_ALIAS("platform:optee");
Annotation
- Immediate include surface: `linux/crash_dump.h`, `linux/errno.h`, `linux/io.h`, `linux/module.h`, `linux/rpmb.h`, `linux/slab.h`, `linux/string.h`, `linux/tee_core.h`.
- Detected declarations: `function rpmb_add_dev`, `function optee_bus_scan_rpmb`, `function optee_rpmb_intf_rdev`, `function optee_set_dma_mask`, `function optee_get_revision`, `function optee_bus_scan`, `function rpmb_routing_model_show`, `function optee_set_dev_group`, `function optee_open`, `function optee_release_helper`.
- Atlas domain: Driver Families / drivers/tee.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.