drivers/firmware/qcom/qcom_scm.c
Source file repositories/reference/linux-study-clean/drivers/firmware/qcom/qcom_scm.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/firmware/qcom/qcom_scm.c- Extension
.c- Size
- 78685 bytes
- Lines
- 2913
- Domain
- Driver Families
- Bucket
- drivers/firmware
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- 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/arm-smccc.hlinux/bitfield.hlinux/bits.hlinux/cleanup.hlinux/clk.hlinux/completion.hlinux/cpumask.hlinux/dma-mapping.hlinux/err.hlinux/export.hlinux/firmware/qcom/qcom_scm.hlinux/firmware/qcom/qcom_tzmem.hlinux/init.hlinux/interconnect.hlinux/interrupt.hlinux/kstrtox.hlinux/module.hlinux/of.hlinux/of_address.hlinux/of_irq.hlinux/of_platform.hlinux/of_reserved_mem.hlinux/platform_device.hlinux/reset-controller.hlinux/remoteproc.hlinux/sizes.hlinux/types.hdt-bindings/interrupt-controller/arm-gic.hqcom_scm.hqcom_tzmem.h
Detected Declarations
struct qcom_scmstruct qcom_scm_current_perm_infostruct qcom_scm_mem_map_infostruct qcom_scm_qseecom_respenum qcom_scm_qseecom_resultenum qcom_scm_qseecom_resp_typeenum qcom_scm_qseecom_tz_ownerenum qcom_scm_qseecom_tz_svcenum qcom_scm_qseecom_tz_cmd_appenum qcom_scm_qseecom_tz_cmd_infofunction qcom_scm_clk_enablefunction qcom_scm_clk_disablefunction qcom_scm_bw_enablefunction qcom_scm_bw_disablefunction __get_conventionfunction qcom_scm_callfunction qcom_scm_call_atomicfunction __qcom_scm_is_call_availablefunction qcom_scm_set_boot_addrfunction for_each_present_cpufunction qcom_scm_set_boot_addr_mcfunction qcom_scm_set_warm_boot_addrfunction qcom_scm_set_cold_boot_addrfunction qcom_scm_cpu_power_downfunction qcom_scm_set_remote_statefunction qcom_scm_disable_sdifunction __qcom_scm_set_dload_modefunction qcom_scm_io_rmwfunction qcom_scm_set_download_modefunction devm_qcom_scm_pas_context_allocfunction __qcom_scm_pas_init_imagefunction qcom_scm_pas_prep_and_init_imagefunction qcom_scm_pas_init_imagefunction qcom_scm_pas_metadata_releasefunction qcom_scm_pas_mem_setupfunction qcom_scm_pas_get_rsc_tablefunction qcom_scm_pas_auth_and_resetfunction qcom_scm_pas_prepare_and_auth_resetfunction qcom_scm_pas_shutdownfunction qcom_scm_pas_supportedfunction __qcom_scm_pas_mss_resetfunction qcom_scm_pas_reset_assertfunction qcom_scm_pas_reset_deassertfunction qcom_scm_io_readlfunction qcom_scm_io_writelfunction qcom_scm_restore_sec_cfg_availablefunction qcom_scm_restore_sec_cfgfunction qcom_scm_set_gpu_smmu_aperture_is_available
Annotated Snippet
subsys_initcall(qcom_scm_init);
MODULE_DESCRIPTION("Qualcomm Technologies, Inc. SCM driver");
MODULE_LICENSE("GPL v2");
Annotation
- Immediate include surface: `linux/arm-smccc.h`, `linux/bitfield.h`, `linux/bits.h`, `linux/cleanup.h`, `linux/clk.h`, `linux/completion.h`, `linux/cpumask.h`, `linux/dma-mapping.h`.
- Detected declarations: `struct qcom_scm`, `struct qcom_scm_current_perm_info`, `struct qcom_scm_mem_map_info`, `struct qcom_scm_qseecom_resp`, `enum qcom_scm_qseecom_result`, `enum qcom_scm_qseecom_resp_type`, `enum qcom_scm_qseecom_tz_owner`, `enum qcom_scm_qseecom_tz_svc`, `enum qcom_scm_qseecom_tz_cmd_app`, `enum qcom_scm_qseecom_tz_cmd_info`.
- Atlas domain: Driver Families / drivers/firmware.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.