📄 config.c
字号:
.nubus_type = MAC_NUBUS }, { .ident = MAC_MODEL_Q610, .name = "Quadra 610", .adb_type = MAC_ADB_II, .via_type = MAC_VIA_QUADRA, .scsi_type = MAC_SCSI_QUADRA, .scc_type = MAC_SCC_QUADRA, .ether_type = MAC_ETHER_SONIC, .nubus_type = MAC_NUBUS }, { .ident = MAC_MODEL_Q630, .name = "Quadra 630", .adb_type = MAC_ADB_CUDA, .via_type = MAC_VIA_QUADRA, .scsi_type = MAC_SCSI_QUADRA, .ide_type = MAC_IDE_QUADRA, .scc_type = MAC_SCC_QUADRA, .ether_type = MAC_ETHER_SONIC, .nubus_type = MAC_NUBUS }, { .ident = MAC_MODEL_Q650, .name = "Quadra 650", .adb_type = MAC_ADB_II, .via_type = MAC_VIA_QUADRA, .scsi_type = MAC_SCSI_QUADRA, .scc_type = MAC_SCC_QUADRA, .ether_type = MAC_ETHER_SONIC, .nubus_type = MAC_NUBUS }, /* The Q700 does have a NS Sonic */ { .ident = MAC_MODEL_Q700, .name = "Quadra 700", .adb_type = MAC_ADB_II, .via_type = MAC_VIA_QUADRA, .scsi_type = MAC_SCSI_QUADRA2, .scc_type = MAC_SCC_QUADRA, .ether_type = MAC_ETHER_SONIC, .nubus_type = MAC_NUBUS }, { .ident = MAC_MODEL_Q800, .name = "Quadra 800", .adb_type = MAC_ADB_II, .via_type = MAC_VIA_QUADRA, .scsi_type = MAC_SCSI_QUADRA, .scc_type = MAC_SCC_QUADRA, .ether_type = MAC_ETHER_SONIC, .nubus_type = MAC_NUBUS }, { .ident = MAC_MODEL_Q840, .name = "Quadra 840AV", .adb_type = MAC_ADB_CUDA, .via_type = MAC_VIA_QUADRA, .scsi_type = MAC_SCSI_QUADRA3, .scc_type = MAC_SCC_PSC, .ether_type = MAC_ETHER_MACE, .nubus_type = MAC_NUBUS }, { .ident = MAC_MODEL_Q900, .name = "Quadra 900", .adb_type = MAC_ADB_IOP, .via_type = MAC_VIA_QUADRA, .scsi_type = MAC_SCSI_QUADRA2, .scc_type = MAC_SCC_IOP, .ether_type = MAC_ETHER_SONIC, .nubus_type = MAC_NUBUS }, { .ident = MAC_MODEL_Q950, .name = "Quadra 950", .adb_type = MAC_ADB_IOP, .via_type = MAC_VIA_QUADRA, .scsi_type = MAC_SCSI_QUADRA2, .scc_type = MAC_SCC_IOP, .ether_type = MAC_ETHER_SONIC, .nubus_type = MAC_NUBUS }, /* * Performa - more LC type machines */ { .ident = MAC_MODEL_P460, .name = "Performa 460", .adb_type = MAC_ADB_IISI, .via_type = MAC_VIA_IIci, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_II, .nubus_type = MAC_NUBUS }, { .ident = MAC_MODEL_P475, .name = "Performa 475", .adb_type = MAC_ADB_CUDA, .via_type = MAC_VIA_QUADRA, .scsi_type = MAC_SCSI_QUADRA, .scc_type = MAC_SCC_II, .nubus_type = MAC_NUBUS }, { .ident = MAC_MODEL_P475F, .name = "Performa 475", .adb_type = MAC_ADB_CUDA, .via_type = MAC_VIA_QUADRA, .scsi_type = MAC_SCSI_QUADRA, .scc_type = MAC_SCC_II, .nubus_type = MAC_NUBUS }, { .ident = MAC_MODEL_P520, .name = "Performa 520", .adb_type = MAC_ADB_CUDA, .via_type = MAC_VIA_IIci, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_II, .nubus_type = MAC_NUBUS }, { .ident = MAC_MODEL_P550, .name = "Performa 550", .adb_type = MAC_ADB_CUDA, .via_type = MAC_VIA_IIci, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_II, .nubus_type = MAC_NUBUS }, /* These have the comm slot, and therefore the possibility of SONIC ethernet */ { .ident = MAC_MODEL_P575, .name = "Performa 575", .adb_type = MAC_ADB_CUDA, .via_type = MAC_VIA_QUADRA, .scsi_type = MAC_SCSI_QUADRA, .scc_type = MAC_SCC_II, .ether_type = MAC_ETHER_SONIC, .nubus_type = MAC_NUBUS }, { .ident = MAC_MODEL_P588, .name = "Performa 588", .adb_type = MAC_ADB_CUDA, .via_type = MAC_VIA_QUADRA, .scsi_type = MAC_SCSI_QUADRA, .ide_type = MAC_IDE_QUADRA, .scc_type = MAC_SCC_II, .ether_type = MAC_ETHER_SONIC, .nubus_type = MAC_NUBUS }, { .ident = MAC_MODEL_TV, .name = "TV", .adb_type = MAC_ADB_CUDA, .via_type = MAC_VIA_QUADRA, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_II, .nubus_type = MAC_NUBUS }, { .ident = MAC_MODEL_P600, .name = "Performa 600", .adb_type = MAC_ADB_IISI, .via_type = MAC_VIA_IIci, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_II, .nubus_type = MAC_NUBUS }, /* * Centris - just guessing again; maybe like Quadra */ /* The C610 may or may not have SONIC. We probe to make sure */ { .ident = MAC_MODEL_C610, .name = "Centris 610", .adb_type = MAC_ADB_II, .via_type = MAC_VIA_QUADRA, .scsi_type = MAC_SCSI_QUADRA, .scc_type = MAC_SCC_QUADRA, .ether_type = MAC_ETHER_SONIC, .nubus_type = MAC_NUBUS }, { .ident = MAC_MODEL_C650, .name = "Centris 650", .adb_type = MAC_ADB_II, .via_type = MAC_VIA_QUADRA, .scsi_type = MAC_SCSI_QUADRA, .scc_type = MAC_SCC_QUADRA, .ether_type = MAC_ETHER_SONIC, .nubus_type = MAC_NUBUS }, { .ident = MAC_MODEL_C660, .name = "Centris 660AV", .adb_type = MAC_ADB_CUDA, .via_type = MAC_VIA_QUADRA, .scsi_type = MAC_SCSI_QUADRA3, .scc_type = MAC_SCC_PSC, .ether_type = MAC_ETHER_MACE, .nubus_type = MAC_NUBUS }, /* * The PowerBooks all the same "Combo" custom IC for SCSI and SCC * and a PMU (in two variations?) for ADB. Most of them use the * Quadra-style VIAs. A few models also have IDE from hell. */ { .ident = MAC_MODEL_PB140, .name = "PowerBook 140", .adb_type = MAC_ADB_PB1, .via_type = MAC_VIA_QUADRA, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_QUADRA, .nubus_type = MAC_NUBUS }, { .ident = MAC_MODEL_PB145, .name = "PowerBook 145", .adb_type = MAC_ADB_PB1, .via_type = MAC_VIA_QUADRA, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_QUADRA, .nubus_type = MAC_NUBUS }, { .ident = MAC_MODEL_PB150, .name = "PowerBook 150", .adb_type = MAC_ADB_PB1, .via_type = MAC_VIA_IIci, .scsi_type = MAC_SCSI_OLD, .ide_type = MAC_IDE_PB, .scc_type = MAC_SCC_QUADRA, .nubus_type = MAC_NUBUS }, { .ident = MAC_MODEL_PB160, .name = "PowerBook 160", .adb_type = MAC_ADB_PB1, .via_type = MAC_VIA_QUADRA, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_QUADRA, .nubus_type = MAC_NUBUS }, { .ident = MAC_MODEL_PB165, .name = "PowerBook 165", .adb_type = MAC_ADB_PB1, .via_type = MAC_VIA_QUADRA, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_QUADRA, .nubus_type = MAC_NUBUS }, { .ident = MAC_MODEL_PB165C, .name = "PowerBook 165c", .adb_type = MAC_ADB_PB1, .via_type = MAC_VIA_QUADRA, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_QUADRA, .nubus_type = MAC_NUBUS }, { .ident = MAC_MODEL_PB170, .name = "PowerBook 170", .adb_type = MAC_ADB_PB1, .via_type = MAC_VIA_QUADRA, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_QUADRA, .nubus_type = MAC_NUBUS }, { .ident = MAC_MODEL_PB180, .name = "PowerBook 180", .adb_type = MAC_ADB_PB1, .via_type = MAC_VIA_QUADRA, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_QUADRA, .nubus_type = MAC_NUBUS }, { .ident = MAC_MODEL_PB180C, .name = "PowerBook 180c", .adb_type = MAC_ADB_PB1, .via_type = MAC_VIA_QUADRA, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_QUADRA, .nubus_type = MAC_NUBUS }, { .ident = MAC_MODEL_PB190, .name = "PowerBook 190", .adb_type = MAC_ADB_PB2, .via_type = MAC_VIA_QUADRA, .scsi_type = MAC_SCSI_OLD, .ide_type = MAC_IDE_BABOON, .scc_type = MAC_SCC_QUADRA, .nubus_type = MAC_NUBUS }, { .ident = MAC_MODEL_PB520, .name = "PowerBook 520", .adb_type = MAC_ADB_PB2, .via_type = MAC_VIA_QUADRA, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_QUADRA, .ether_type = MAC_ETHER_SONIC, .nubus_type = MAC_NUBUS }, /* * PowerBook Duos are pretty much like normal PowerBooks * All of these probably have onboard SONIC in the Dock which * means we'll have to probe for it eventually. * * Are these reallly MAC_VIA_IIci? The developer notes for the * Duos show pretty much the same custom parts as in most of * the other PowerBooks which would imply MAC_VIA_QUADRA. */ { .ident = MAC_MODEL_PB210, .name = "PowerBook Duo 210", .adb_type = MAC_ADB_PB2, .via_type = MAC_VIA_IIci, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_QUADRA, .nubus_type = MAC_NUBUS }, { .ident = MAC_MODEL_PB230, .name = "PowerBook Duo 230", .adb_type = MAC_ADB_PB2, .via_type = MAC_VIA_IIci, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_QUADRA, .nubus_type = MAC_NUBUS }, { .ident = MAC_MODEL_PB250, .name = "PowerBook Duo 250", .adb_type = MAC_ADB_PB2, .via_type = MAC_VIA_IIci, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_QUADRA, .nubus_type = MAC_NUBUS }, { .ident = MAC_MODEL_PB270C, .name = "PowerBook Duo 270c", .adb_type = MAC_ADB_PB2, .via_type = MAC_VIA_IIci, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_QUADRA, .nubus_type = MAC_NUBUS }, { .ident = MAC_MODEL_PB280, .name = "PowerBook Duo 280", .adb_type = MAC_ADB_PB2, .via_type = MAC_VIA_IIci, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_QUADRA, .nubus_type = MAC_NUBUS }, { .ident = MAC_MODEL_PB280C, .name = "PowerBook Duo 280c", .adb_type = MAC_ADB_PB2, .via_type = MAC_VIA_IIci, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_QUADRA, .nubus_type = MAC_NUBUS }, /* * Other stuff ?? */ { .ident = -1 }};void mac_identify(void){ struct mac_model *m; /* Penguin data useful? */ int model = mac_bi_data.id; if (!model) { /* no bootinfo model id -> NetBSD booter was used! */ /* XXX FIXME: breaks for model > 31 */ model=(mac_bi_data.cpuid>>2)&63; printk (KERN_WARNING "No bootinfo model ID, using cpuid instead (hey, use Penguin!)\n"); } macintosh_config = mac_data_table; for (m = macintosh_config ; m->ident != -1 ; m++) { if (m->ident == model) { macintosh_config = m; break; } } /* We need to pre-init the IOPs, if any. Otherwise */ /* the serial console won't work if the user had */ /* the serial ports set to "Faster" mode in MacOS. */ iop_preinit(); mac_debug_init(); printk (KERN_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);#if 0 printk ("Ramdisk: addr 0x%lx size 0x%lx\n", m68k_ramdisk.addr, m68k_ramdisk.size);#endif /* * TODO: set the various fields in macintosh_config->hw_present here! */ switch (macintosh_config->scsi_type) { case MAC_SCSI_OLD: MACHW_SET(MAC_SCSI_80); break; case MAC_SCSI_QUADRA: case MAC_SCSI_QUADRA2: case MAC_SCSI_QUADRA3: MACHW_SET(MAC_SCSI_96); if ((macintosh_config->ident == MAC_MODEL_Q900) || (macintosh_config->ident == MAC_MODEL_Q950)) MACHW_SET(MAC_SCSI_96_2); break; default: printk(KERN_WARNING "config.c: wtf: unknown scsi, using 53c80\n"); MACHW_SET(MAC_SCSI_80); break; } iop_init(); via_init(); oss_init(); psc_init(); baboon_init();}void mac_report_hardware(void){ printk(KERN_INFO "Apple Macintosh %s\n", macintosh_config->name);}static void mac_get_model(char *str){ strcpy(str,"Macintosh "); strcat(str, macintosh_config->name);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -