drivers/char/tpm/xen-tpmfront.c
Source file repositories/reference/linux-study-clean/drivers/char/tpm/xen-tpmfront.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/char/tpm/xen-tpmfront.c- Extension
.c- Size
- 9650 bytes
- Lines
- 443
- Domain
- Driver Families
- Bucket
- drivers/char
- 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.
- 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/errno.hlinux/err.hlinux/interrupt.hlinux/freezer.hxen/xen.hxen/events.hxen/interface/io/tpmif.hxen/grant_table.hxen/xenbus.hxen/page.htpm.hxen/platform_pci.h
Detected Declarations
struct tpm_privateenum status_bitsfunction wait_for_tpm_stat_condfunction wait_for_tpm_statfunction vtpm_statusfunction vtpm_req_canceledfunction vtpm_cancelfunction shr_data_offsetfunction vtpm_sendfunction vtpm_recvfunction tpmif_interruptfunction setup_chipfunction setup_ringfunction ring_freefunction tpmfront_probefunction tpmfront_removefunction tpmfront_resumefunction backend_changedfunction xen_tpmfront_initfunction xen_tpmfront_exitmodule init xen_tpmfront_init
Annotated Snippet
module_init(xen_tpmfront_init);
static void __exit xen_tpmfront_exit(void)
{
xenbus_unregister_driver(&tpmfront_driver);
}
module_exit(xen_tpmfront_exit);
MODULE_AUTHOR("Daniel De Graaf <dgdegra@tycho.nsa.gov>");
MODULE_DESCRIPTION("Xen vTPM Driver");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/errno.h`, `linux/err.h`, `linux/interrupt.h`, `linux/freezer.h`, `xen/xen.h`, `xen/events.h`, `xen/interface/io/tpmif.h`, `xen/grant_table.h`.
- Detected declarations: `struct tpm_private`, `enum status_bits`, `function wait_for_tpm_stat_cond`, `function wait_for_tpm_stat`, `function vtpm_status`, `function vtpm_req_canceled`, `function vtpm_cancel`, `function shr_data_offset`, `function vtpm_send`, `function vtpm_recv`.
- Atlas domain: Driver Families / drivers/char.
- Implementation status: integration implementation candidate.
- 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.