arch/mips/boot/compressed/decompress.c
Source file repositories/reference/linux-study-clean/arch/mips/boot/compressed/decompress.c
File Facts
- System
- Linux kernel
- Corpus path
arch/mips/boot/compressed/decompress.c- Extension
.c- Size
- 3128 bytes
- Lines
- 130
- Domain
- Architecture Layer
- Bucket
- arch/mips
- Inferred role
- Architecture Layer: implementation source
- Status
- source implementation candidate
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
Dependency Surface
linux/types.hlinux/kernel.hlinux/string.hlinux/libfdt.hasm/addrspace.hlinux/unaligned.hasm-generic/vmlinux.lds.hdecompress.h../../../../lib/decompress_inflate.c../../../../lib/decompress_bunzip2.c../../../../lib/decompress_unlz4.c../../../../lib/decompress_unlzma.c../../../../lib/decompress_unlzo.c../../../../lib/decompress_unxz.c../../../../lib/decompress_unzstd.c
Detected Declarations
function errorfunction __stack_chk_failfunction decompress_kernel
Annotated Snippet
fdt_magic((void *)&__appended_dtb) == FDT_MAGIC) {
unsigned int image_size, dtb_size;
dtb_size = fdt_totalsize((void *)&__appended_dtb);
/* last four bytes is always image size in little endian */
image_size = get_unaligned_le32((void *)__image_end - 4);
/* The device tree's address must be properly aligned */
image_size = ALIGN(image_size, STRUCT_ALIGNMENT);
puts("Copy device tree to address ");
puthex(VMLINUX_LOAD_ADDRESS_ULL + image_size);
puts("\n");
/* copy dtb to where the booted kernel will expect it */
memcpy((void *)VMLINUX_LOAD_ADDRESS_ULL + image_size,
__appended_dtb, dtb_size);
}
/* FIXME: should we flush cache here? */
puts("Now, booting the kernel...\n");
}
Annotation
- Immediate include surface: `linux/types.h`, `linux/kernel.h`, `linux/string.h`, `linux/libfdt.h`, `asm/addrspace.h`, `linux/unaligned.h`, `asm-generic/vmlinux.lds.h`, `decompress.h`.
- Detected declarations: `function error`, `function __stack_chk_fail`, `function decompress_kernel`.
- Atlas domain: Architecture Layer / arch/mips.
- Implementation status: source 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.