drivers/firmware/qemu_fw_cfg.c
Source file repositories/reference/linux-study-clean/drivers/firmware/qemu_fw_cfg.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/firmware/qemu_fw_cfg.c- Extension
.c- Size
- 25743 bytes
- Lines
- 940
- 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.
- 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/module.hlinux/mod_devicetable.hlinux/platform_device.hlinux/acpi.hlinux/slab.hlinux/io.hlinux/ioport.huapi/linux/qemu_fw_cfg.hlinux/delay.hlinux/crash_dump.hlinux/vmcore_info.h
Detected Declarations
struct fw_cfg_sysfs_entrystruct fw_cfg_sysfs_attributefunction fw_cfg_sel_endiannessfunction fw_cfg_dma_enabledfunction fw_cfg_wait_for_controlfunction fw_cfg_dma_transferfunction fw_cfg_read_blobfunction fw_cfg_write_blobfunction fw_cfg_io_cleanupfunction fw_cfg_do_platform_probefunction memcmpfunction fw_cfg_showrevfunction fw_cfg_write_vmcoreinfofunction fw_cfg_sysfs_cache_enlistfunction fw_cfg_sysfs_cache_delistfunction fw_cfg_sysfs_cache_cleanupfunction list_for_each_entry_safefunction fw_cfg_sysfs_show_sizefunction fw_cfg_sysfs_show_keyfunction fw_cfg_sysfs_show_namefunction fw_cfg_sysfs_attr_showfunction fw_cfg_sysfs_release_entryfunction fw_cfg_sysfs_read_rawfunction fw_cfg_build_symlinkfunction fw_cfg_kset_unregister_recursivefunction fw_cfg_register_filefunction strcmpfunction fw_cfg_register_dir_entriesfunction fw_cfg_kobj_cleanupfunction fw_cfg_sysfs_probefunction fw_cfg_sysfs_removefunction fw_cfg_cmdline_setfunction fw_cfg_cmdline_getfunction fw_cfg_sysfs_initfunction fw_cfg_sysfs_exitmodule init fw_cfg_sysfs_init
Annotated Snippet
module_init(fw_cfg_sysfs_init);
module_exit(fw_cfg_sysfs_exit);
Annotation
- Immediate include surface: `linux/module.h`, `linux/mod_devicetable.h`, `linux/platform_device.h`, `linux/acpi.h`, `linux/slab.h`, `linux/io.h`, `linux/ioport.h`, `uapi/linux/qemu_fw_cfg.h`.
- Detected declarations: `struct fw_cfg_sysfs_entry`, `struct fw_cfg_sysfs_attribute`, `function fw_cfg_sel_endianness`, `function fw_cfg_dma_enabled`, `function fw_cfg_wait_for_control`, `function fw_cfg_dma_transfer`, `function fw_cfg_read_blob`, `function fw_cfg_write_blob`, `function fw_cfg_io_cleanup`, `function fw_cfg_do_platform_probe`.
- 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.
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.