drivers/firmware/iscsi_ibft_find.c
Source file repositories/reference/linux-study-clean/drivers/firmware/iscsi_ibft_find.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/firmware/iscsi_ibft_find.c- Extension
.c- Size
- 2352 bytes
- Lines
- 101
- 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.
Dependency Surface
linux/memblock.hlinux/blkdev.hlinux/ctype.hlinux/device.hlinux/efi.hlinux/err.hlinux/init.hlinux/limits.hlinux/module.hlinux/pci.hlinux/stat.hlinux/string.hlinux/types.hlinux/acpi.hlinux/iscsi_ibft.hasm/mmzone.h
Detected Declarations
function reserve_ibft_regionexport ibft_phys_addr
Annotated Snippet
if (offset_in_page(pos) == 0) {
if (virt)
early_memunmap(virt, PAGE_SIZE);
virt = early_memremap_ro(pos, PAGE_SIZE);
virt_pos = pos;
}
for (i = 0; i < ARRAY_SIZE(ibft_signs); i++) {
if (memcmp(virt + (pos - virt_pos), ibft_signs[i].sign,
IBFT_SIGN_LEN) == 0) {
unsigned long *addr =
(unsigned long *)(virt + pos - virt_pos + 4);
len = *addr;
/* if the length of the table extends past 1M,
* the table cannot be valid. */
if (pos + len <= (IBFT_END-1)) {
ibft_phys_addr = pos;
memblock_reserve(ibft_phys_addr, PAGE_ALIGN(len));
pr_info("iBFT found at %pa.\n", &ibft_phys_addr);
goto out;
}
}
}
}
out:
early_memunmap(virt, PAGE_SIZE);
}
Annotation
- Immediate include surface: `linux/memblock.h`, `linux/blkdev.h`, `linux/ctype.h`, `linux/device.h`, `linux/efi.h`, `linux/err.h`, `linux/init.h`, `linux/limits.h`.
- Detected declarations: `function reserve_ibft_region`, `export ibft_phys_addr`.
- Atlas domain: Driver Families / drivers/firmware.
- Implementation status: integration implementation candidate.
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.