arch/m68k/sun3/config.c
Source file repositories/reference/linux-study-clean/arch/m68k/sun3/config.c
File Facts
- System
- Linux kernel
- Corpus path
arch/m68k/sun3/config.c- Extension
.c- Size
- 5450 bytes
- Lines
- 222
- Domain
- Architecture Layer
- Bucket
- arch/m68k
- 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/types.hlinux/kernel.hlinux/mm.hlinux/seq_file.hlinux/tty.hlinux/console.hlinux/init.hlinux/memblock.hlinux/platform_device.hlinux/linkage.hasm/oplib.hasm/setup.hasm/contregs.hasm/movs.hasm/pgalloc.hasm/sun3-head.hasm/sun3mmu.hasm/machdep.hasm/machines.hasm/idprom.hasm/intersil.hasm/irq.hasm/sections.hasm/sun3ints.hasm/config.hsun3.h
Detected Declarations
function sun3_get_hardware_listfunction sun3_initfunction sun3_rebootfunction sun3_haltfunction sun3_bootmem_allocfunction config_sun3function sun3_sched_initfunction sun3_platform_init
Annotated Snippet
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/seq_file.h>
#include <linux/tty.h>
#include <linux/console.h>
#include <linux/init.h>
#include <linux/memblock.h>
#include <linux/platform_device.h>
#include <linux/linkage.h>
#include <asm/oplib.h>
#include <asm/setup.h>
#include <asm/contregs.h>
#include <asm/movs.h>
#include <asm/pgalloc.h>
#include <asm/sun3-head.h>
#include <asm/sun3mmu.h>
#include <asm/machdep.h>
#include <asm/machines.h>
#include <asm/idprom.h>
#include <asm/intersil.h>
#include <asm/irq.h>
#include <asm/sections.h>
#include <asm/sun3ints.h>
#include <asm/config.h>
#include "sun3.h"
char sun3_reserved_pmeg[SUN3_PMEGS_NUM];
static void sun3_sched_init(void);
volatile char* clock_va;
extern unsigned long availmem;
unsigned long num_pages;
static void sun3_get_hardware_list(struct seq_file *m)
{
seq_printf(m, "PROM Revision:\t%s\n", romvec->pv_monid);
}
asmlinkage void __init sun3_init(void)
{
unsigned char enable_register;
int i;
m68k_machtype= MACH_SUN3;
m68k_cputype = CPU_68020;
m68k_fputype = FPU_68881; /* mc68881 actually */
m68k_mmutype = MMU_SUN3;
clock_va = (char *) 0xfe06000; /* dark */
sun3_intreg = (unsigned char *) 0xfe0a000; /* magic */
sun3_disable_interrupts();
prom_init((void *)LINUX_OPPROM_BEGVM);
GET_CONTROL_BYTE(AC_SENABLE,enable_register);
enable_register |= 0x50; /* Enable FPU */
SET_CONTROL_BYTE(AC_SENABLE,enable_register);
GET_CONTROL_BYTE(AC_SENABLE,enable_register);
/* This code looks suspicious, because it doesn't subtract
memory belonging to the kernel from the available space */
memset(sun3_reserved_pmeg, 0, sizeof(sun3_reserved_pmeg));
/* Reserve important PMEGS */
/* FIXME: These should be probed instead of hardcoded */
for (i=0; i<8; i++) /* Kernel PMEGs */
sun3_reserved_pmeg[i] = 1;
sun3_reserved_pmeg[247] = 1; /* ROM mapping */
sun3_reserved_pmeg[248] = 1; /* AMD Ethernet */
sun3_reserved_pmeg[251] = 1; /* VB area */
sun3_reserved_pmeg[254] = 1; /* main I/O */
sun3_reserved_pmeg[249] = 1;
sun3_reserved_pmeg[252] = 1;
sun3_reserved_pmeg[253] = 1;
set_fc(USER_DATA);
}
/* Without this, Bad Things happen when something calls arch_reset. */
static void sun3_reboot (void)
{
prom_reboot ("vmlinux");
}
Annotation
- Immediate include surface: `linux/types.h`, `linux/kernel.h`, `linux/mm.h`, `linux/seq_file.h`, `linux/tty.h`, `linux/console.h`, `linux/init.h`, `linux/memblock.h`.
- Detected declarations: `function sun3_get_hardware_list`, `function sun3_init`, `function sun3_reboot`, `function sun3_halt`, `function sun3_bootmem_alloc`, `function config_sun3`, `function sun3_sched_init`, `function sun3_platform_init`.
- Atlas domain: Architecture Layer / arch/m68k.
- 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.