staticvoid __noreturn cfe_linux_exit(void *arg)
{ int warm = *(int *)arg;
if (smp_processor_id()) { staticint reboot_smp;
/* Don't repeat the process from another CPU */ if (!reboot_smp) { /* Get CPU 0 to do the cfe_exit */
reboot_smp = 1;
smp_call_function(cfe_linux_exit, arg, 0);
}
} else {
printk("Passing control back to CFE...\n");
cfe_exit(warm, 0);
printk("cfe_exit returned??\n");
} while (1);
}
/* Make a copy of the initrd argument so we can smash it up here */ for (idx = 0; idx < sizeof(rdarg)-1; idx++) { if (!str[idx] || (str[idx] == ' ')) break;
rdarg[idx] = str[idx];
}
/* *Checkifaloaderwasused;ifNOT,the4argumentsare *whatCFEgivesus(handle,0,EPTandEPTSEAL)
*/ if (argc < 0) {
cfe_handle = (uint64_t)(long)argc;
cfe_ept = (long)envp;
cfe_eptseal = (uint32_t)(unsignedlong)prom_vec;
} else { if ((int32_t)(long)prom_vec < 0) { /* *Oldloader;allitgivesusisthehandle, *sousethe"known"entrypointandassume *theseal.
*/
cfe_handle = (uint64_t)(long)prom_vec;
cfe_ept = (uint64_t)((int32_t)0x9fc00500);
cfe_eptseal = CFE_EPTSEAL;
} else { /* *Newerloadersbundlethehandle/ept/eptseal *Note:prom_vecisintheloader'suseg *whichisstillaliveintheTLB.
*/
cfe_handle = (uint64_t)((int32_t *)prom_vec)[0];
cfe_ept = (uint64_t)((int32_t *)prom_vec)[2];
cfe_eptseal = (unsignedint)((uint32_t *)prom_vec)[3];
}
} if (cfe_eptseal != CFE_EPTSEAL) { /* too early for panic to do any good */
printk("CFE's entrypoint seal doesn't match. Spinning."); while (1) ;
}
cfe_init(cfe_handle, cfe_ept); /* *Getthehandlefor(atleast)prom_putchar,possiblyfor *bootconsole
*/
cfe_cons_handle = cfe_getstdhandle(CFE_STDHANDLE_CONSOLE); if (cfe_getenv("LINUX_CMDLINE", arcs_cmdline, COMMAND_LINE_SIZE) < 0) { if (argc >= 0) { /* The loader should have set the command line */ /* too early for panic to do any good */
printk("LINUX_CMDLINE not defined in cfe."); while (1) ;
}
}
#ifdef CONFIG_BLK_DEV_INITRD
{ char *ptr; /* Need to find out early whether we've got an initrd. So scan
the list looking now */ for (ptr = arcs_cmdline; *ptr; ptr++) { while (*ptr == ' ') {
ptr++;
} if (!strncmp(ptr, "initrd=", 7)) {
initrd_setup(ptr+7); break;
} else { while (*ptr && (*ptr != ' ')) {
ptr++;
}
}
}
} #endif/* CONFIG_BLK_DEV_INITRD */
/* Not sure this is needed, but it's the safe way. */
arcs_cmdline[COMMAND_LINE_SIZE-1] = 0;
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.