arch/mips/fw/arc/memory.c
Source file repositories/reference/linux-study-clean/arch/mips/fw/arc/memory.c
File Facts
- System
- Linux kernel
- Corpus path
arch/mips/fw/arc/memory.c- Extension
.c- Size
- 4313 bytes
- Lines
- 193
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/init.hlinux/kernel.hlinux/types.hlinux/sched.hlinux/mm.hlinux/memblock.hlinux/swap.hasm/sgialib.hasm/page.hasm/bootinfo.h
Detected Declarations
function ArcGetMemoryDescriptorfunction memtype_classify_arcsfunction memtype_classify_arcfunction prom_memtype_classifyfunction prom_meminitfunction prom_cleanup
Annotated Snippet
if (type == mem_prom_used) {
memblock_reserve(base, size);
if (nr_prom_mem >= 5) {
pr_err("Too many ROM DATA regions");
continue;
}
prom_mem_base[nr_prom_mem] = base;
prom_mem_size[nr_prom_mem] = size;
nr_prom_mem++;
}
}
}
void __weak __init prom_cleanup(void)
{
}
void __init prom_free_prom_memory(void)
{
int i;
if (prom_flags & PROM_FLAG_DONT_FREE_TEMP)
return;
for (i = 0; i < nr_prom_mem; i++) {
free_init_pages("prom memory",
prom_mem_base[i], prom_mem_base[i] + prom_mem_size[i]);
}
/*
* at this point it isn't safe to call PROM functions
* give platforms a way to do PROM cleanups
*/
prom_cleanup();
}
Annotation
- Immediate include surface: `linux/init.h`, `linux/kernel.h`, `linux/types.h`, `linux/sched.h`, `linux/mm.h`, `linux/memblock.h`, `linux/swap.h`, `asm/sgialib.h`.
- Detected declarations: `function ArcGetMemoryDescriptor`, `function memtype_classify_arcs`, `function memtype_classify_arc`, `function prom_memtype_classify`, `function prom_meminit`, `function prom_cleanup`.
- 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.