drivers/tee/amdtee/core.c
Source file repositories/reference/linux-study-clean/drivers/tee/amdtee/core.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/tee/amdtee/core.c- Extension
.c- Size
- 10882 bytes
- Lines
- 494
- 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/errno.hlinux/device.hlinux/firmware.hlinux/io.hlinux/mm.hlinux/module.hlinux/psp-tee.hlinux/slab.hlinux/string.hlinux/tee_core.hlinux/types.hlinux/uaccess.hamdtee_private.h
Detected Declarations
function amdtee_get_versionfunction amdtee_openfunction release_sessionfunction amdtee_releasefunction alloc_sessionfunction copy_ta_binaryfunction destroy_sessionfunction amdtee_open_sessionfunction amdtee_close_sessionfunction amdtee_map_shmemfunction amdtee_unmap_shmemfunction amdtee_invoke_funcfunction amdtee_cancel_reqfunction amdtee_driver_initfunction amdtee_driver_exitmodule init amdtee_driver_init
Annotated Snippet
module_init(amdtee_driver_init);
static void __exit amdtee_driver_exit(void)
{
struct amdtee *amdtee;
if (!drv_data || !drv_data->amdtee)
return;
amdtee = drv_data->amdtee;
tee_device_unregister(amdtee->teedev);
tee_shm_pool_free(amdtee->pool);
}
module_exit(amdtee_driver_exit);
MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION("AMD-TEE driver");
MODULE_VERSION("1.0");
MODULE_LICENSE("Dual MIT/GPL");
Annotation
- Immediate include surface: `linux/errno.h`, `linux/device.h`, `linux/firmware.h`, `linux/io.h`, `linux/mm.h`, `linux/module.h`, `linux/psp-tee.h`, `linux/slab.h`.
- Detected declarations: `function amdtee_get_version`, `function amdtee_open`, `function release_session`, `function amdtee_release`, `function alloc_session`, `function copy_ta_binary`, `function destroy_session`, `function amdtee_open_session`, `function amdtee_close_session`, `function amdtee_map_shmem`.
- 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.