arch/m68k/mac/config.c
Source file repositories/reference/linux-study-clean/arch/m68k/mac/config.c
File Facts
- System
- Linux kernel
- Corpus path
arch/m68k/mac/config.c- Extension
.c- Size
- 29010 bytes
- Lines
- 1100
- Domain
- Architecture Layer
- Bucket
- arch/m68k
- Inferred role
- Architecture Layer: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/errno.hlinux/module.hlinux/reboot.hlinux/types.hlinux/mm.hlinux/console.hlinux/interrupt.hlinux/random.hlinux/delay.hlinux/init.hlinux/platform_device.hlinux/ata_platform.hlinux/adb.hlinux/cuda.hlinux/pmu.hlinux/rtc.hasm/setup.hasm/bootinfo.hasm/bootinfo-mac.hasm/byteorder.hasm/io.hasm/irq.hasm/machdep.hasm/macintosh.hasm/macints.hasm/machw.hasm/mac_iop.hasm/mac_via.hasm/mac_oss.hasm/mac_psc.hasm/config.hmac.h
Detected Declarations
function mac_sched_initfunction mac_parse_bootinfofunction config_macfunction mac_identifyfunction mac_report_hardwarefunction mac_get_modelfunction mac_platform_initfunction deviceexport macintosh_configexport scc_a_pdevexport scc_b_pdev
Annotated Snippet
if (m->ident == model) {
macintosh_config = m;
break;
}
}
/* Set up serial port resources for the console initcall. */
scc_a_rsrcs[0].start = (resource_size_t)mac_bi_data.sccbase + 2;
scc_a_rsrcs[0].end = scc_a_rsrcs[0].start;
scc_a_pdev.num_resources = ARRAY_SIZE(scc_a_rsrcs);
scc_a_pdev.resource = scc_a_rsrcs;
scc_b_rsrcs[0].start = (resource_size_t)mac_bi_data.sccbase;
scc_b_rsrcs[0].end = scc_b_rsrcs[0].start;
scc_b_pdev.num_resources = ARRAY_SIZE(scc_b_rsrcs);
scc_b_pdev.resource = scc_b_rsrcs;
switch (macintosh_config->scc_type) {
case MAC_SCC_PSC:
scc_a_rsrcs[1].start = scc_a_rsrcs[1].end = IRQ_MAC_SCC_A;
scc_b_rsrcs[1].start = scc_b_rsrcs[1].end = IRQ_MAC_SCC_B;
break;
default:
/* On non-PSC machines, the serial ports share an IRQ. */
if (macintosh_config->ident == MAC_MODEL_IIFX) {
scc_a_rsrcs[1].start = scc_a_rsrcs[1].end = IRQ_MAC_SCC;
scc_b_rsrcs[1].start = scc_b_rsrcs[1].end = IRQ_MAC_SCC;
} else {
scc_a_rsrcs[1].start = scc_a_rsrcs[1].end = IRQ_AUTO_4;
scc_b_rsrcs[1].start = scc_b_rsrcs[1].end = IRQ_AUTO_4;
}
break;
}
pr_info("Detected Macintosh model: %d\n", model);
/*
* Report booter data:
*/
printk(KERN_DEBUG " Penguin bootinfo data:\n");
printk(KERN_DEBUG " Video: addr 0x%lx row 0x%lx depth %lx dimensions %ld x %ld\n",
mac_bi_data.videoaddr, mac_bi_data.videorow,
mac_bi_data.videodepth, mac_bi_data.dimensions & 0xFFFF,
mac_bi_data.dimensions >> 16);
printk(KERN_DEBUG " Videological 0x%lx phys. 0x%lx, SCC at 0x%lx\n",
mac_bi_data.videological, mac_orig_videoaddr,
mac_bi_data.sccbase);
printk(KERN_DEBUG " Boottime: 0x%lx GMTBias: 0x%lx\n",
mac_bi_data.boottime, mac_bi_data.gmtbias);
printk(KERN_DEBUG " Machine ID: %ld CPUid: 0x%lx memory size: 0x%lx\n",
mac_bi_data.id, mac_bi_data.cpuid, mac_bi_data.memsize);
iop_init();
oss_init();
via_init();
psc_init();
baboon_init();
#ifdef CONFIG_ADB_CUDA
find_via_cuda();
#endif
#ifdef CONFIG_ADB_PMU
find_via_pmu();
#endif
}
static void __init mac_report_hardware(void)
{
pr_info("Apple Macintosh %s\n", macintosh_config->name);
}
static void mac_get_model(char *str)
{
strcpy(str, "Macintosh ");
strcat(str, macintosh_config->name);
}
static const struct resource mac_scsi_iifx_rsrc[] __initconst = {
{
.flags = IORESOURCE_IRQ,
.start = IRQ_MAC_SCSI,
.end = IRQ_MAC_SCSI,
}, {
.flags = IORESOURCE_MEM,
.start = 0x50008000,
.end = 0x50009FFF,
}, {
.flags = IORESOURCE_MEM,
.start = 0x50008000,
Annotation
- Immediate include surface: `linux/errno.h`, `linux/module.h`, `linux/reboot.h`, `linux/types.h`, `linux/mm.h`, `linux/console.h`, `linux/interrupt.h`, `linux/random.h`.
- Detected declarations: `function mac_sched_init`, `function mac_parse_bootinfo`, `function config_mac`, `function mac_identify`, `function mac_report_hardware`, `function mac_get_model`, `function mac_platform_init`, `function device`, `export macintosh_config`, `export scc_a_pdev`.
- Atlas domain: Architecture Layer / arch/m68k.
- Implementation status: integration implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.