/* Typing sync at the prom prompt calls the function pointed to by * romvec->pv_synchook which I set to the following function. * This should sync all filesystems and return, for now it just * prints out pretty messages and returns.
*/
/* * Process kernel command line switches that are specific to the * SPARC or that require special low-level processing.
*/ staticvoid __init process_switch(char c)
{ switch (c) { case'd':
boot_flags |= BOOTME_DEBUG; break; case's': break; case'h':
prom_printf("boot_flags_init: Halt!\n");
prom_halt(); break; case'p':
prom_early_console.flags &= ~CON_BOOT; break; default:
printk("Unknown boot switch (-%c)\n", c); break;
}
}
staticvoid __init boot_flags_init(char *commands)
{ while (*commands) { /* Move to the start of the next "argument". */ while (*commands == ' ')
commands++;
/* Process any command switches, otherwise skip it. */ if (*commands == '\0') break; if (*commands == '-') {
commands++; while (*commands && *commands != ' ')
process_switch(*commands++); continue;
} if (!strncmp(commands, "mem=", 4)) { /* * "mem=XXX[kKmM] overrides the PROM-reported * memory size.
*/
cmdline_memory_size = simple_strtoul(commands + 4,
&commands, 0); if (*commands == 'K' || *commands == 'k') {
cmdline_memory_size <<= 10;
commands++;
} elseif (*commands=='M' || *commands=='m') {
cmdline_memory_size <<= 20;
commands++;
}
} while (*commands && *commands != ' ')
commands++;
}
}
/* Called from head_32.S - before we have setup anything * in the kernel. Be very careful with what you do here.
*/ void __init sparc32_start_kernel(struct linux_romvec *rp)
{
prom_init(rp);
/* Set sparc_cpu_model */
sparc_cpu_model = sun_unknown; if (!strcmp(&cputypval[0], "sun4m"))
sparc_cpu_model = sun4m; if (!strcmp(&cputypval[0], "sun4s"))
sparc_cpu_model = sun4m; /* CP-1200 with PROM 2.30 -E */ if (!strcmp(&cputypval[0], "sun4d"))
sparc_cpu_model = sun4d; if (!strcmp(&cputypval[0], "sun4e"))
sparc_cpu_model = sun4e; if (!strcmp(&cputypval[0], "sun4u"))
sparc_cpu_model = sun4u; if (!strncmp(&cputypval[0], "leon" , 4))
sparc_cpu_model = sparc_leon;
leon_patch();
start_kernel();
}
void __init setup_arch(char **cmdline_p)
{ int i; unsignedlong highest_paddr;
/* Run-time patch instructions to match the cpu model */
per_cpu_patch();
paging_init();
smp_setup_cpu_possible_map();
}
externint stop_a_enabled;
void sun_do_break(void)
{ if (!stop_a_enabled) return;
printk("\n");
flush_user_windows();
prom_cmdline();
}
EXPORT_SYMBOL(sun_do_break);
int stop_a_enabled = 1;
staticint __init topology_init(void)
{ int i, ncpus, err;
/* Count the number of physically present processors in * the machine, even on uniprocessor, so that /proc/cpuinfo * output is consistent with 2.4.x
*/
ncpus = 0; while (!cpu_find_by_instance(ncpus, NULL, NULL))
ncpus++;
ncpus_probed = ncpus;
err = 0;
for_each_online_cpu(i) { struct cpu *p = kzalloc(sizeof(*p), GFP_KERNEL); if (!p)
err = -ENOMEM; else
register_cpu(p, i);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.