arch/mips/sgi-ip32/ip32-memory.c
Source file repositories/reference/linux-study-clean/arch/mips/sgi-ip32/ip32-memory.c
File Facts
- System
- Linux kernel
- Corpus path
arch/mips/sgi-ip32/ip32-memory.c- Extension
.c- Size
- 1069 bytes
- Lines
- 44
- 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/init.hlinux/kernel.hlinux/memblock.hlinux/mm.hasm/ip32/crime.hasm/bootinfo.hasm/page.hasm/sgialib.h
Detected Declarations
function prom_meminit
Annotated Snippet
#include <linux/types.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/memblock.h>
#include <linux/mm.h>
#include <asm/ip32/crime.h>
#include <asm/bootinfo.h>
#include <asm/page.h>
#include <asm/sgialib.h>
extern void crime_init(void);
void __init prom_meminit(void)
{
u64 base, size;
int bank;
crime_init();
for (bank=0; bank < CRIME_MAXBANKS; bank++) {
u64 bankctl = crime->bank_ctrl[bank];
base = (bankctl & CRIME_MEM_BANK_CONTROL_ADDR) << 25;
if (bank != 0 && base == 0)
continue;
size = (bankctl & CRIME_MEM_BANK_CONTROL_SDRAM_SIZE) ? 128 : 32;
size <<= 20;
if (base + size > (256 << 20))
base += CRIME_HI_MEM_BASE;
printk("CRIME MC: bank %u base 0x%016Lx size %LuMiB\n",
bank, base, size >> 20);
memblock_add(base, size);
}
}
Annotation
- Immediate include surface: `linux/types.h`, `linux/init.h`, `linux/kernel.h`, `linux/memblock.h`, `linux/mm.h`, `asm/ip32/crime.h`, `asm/bootinfo.h`, `asm/page.h`.
- Detected declarations: `function prom_meminit`.
- 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.