#define COMMAND_GLOBAL F_EXTEND(0xfffe0030) #define CMD_RESET 5/* reset any module */
/* **TheWrightBrothersandGeckosystemshaveaH/Wproblem **(Lasi...'nufsaid)maycauseabroadcastresettolockup **thesystem.AnHVERSIONdependentPDCcallwasdeveloped **toperforma"safe",platformspecificbroadcastresetinstead **ofkludgingupallthecode. ** **OldermachineswhichdonotimplementPDC_BROADCAST_RESETwill **return(withanerror)andtheregularbroadcastresetcanbe **issued.Obviously,ifthePDCdoesimplementPDC_BROADCAST_RESET **thePDCcallwillnotreturn(thesystemwillbereset).
*/ void machine_restart(char *cmd)
{ #ifdef FASTBOOT_SELFTEST_SUPPORT /* **IfuserhasmodifiedtheFirmwareSelftestBitmap, **runthetestsspecifiedinthebitmapafterthe **systemisrebootedw/PDC_DO_RESET. ** **ftc_bitmap=0x1AUL"Skipdestructivememorytests" ** **Using"directedresets"ateachprocessorwiththeMEM_TOC **vectorclearedwillalsoavoidrunningdestructive **memoryselftests.(Notimplementedyet)
*/ if (ftc_bitmap) {
pdc_do_firm_test_reset(ftc_bitmap);
} #endif /* set up a new led state on systems shipped with a LED State panel */
pdc_chassis_send_status(PDC_CHASSIS_DIRECT_SHUTDOWN);
/* "Normal" system reset */
pdc_do_reset();
/* Nope...box should reset with just CMD_RESET now */
gsc_writel(CMD_RESET, COMMAND_GLOBAL);
/* Wait for RESET to lay us to rest. */ while (1) ;
}
/* *Thisroutineiscalledfromsys_reboottoactuallyturnoffthe *machine
*/ void machine_power_off(void)
{ /* Put the soft power button back under hardware control. *Iftheuserhadalreadypressedthepowerbutton,the
* following call will immediately power off. */
pdc_soft_power_button(0);
/* We have to use void * instead of a function pointer, because *functionpointersaren'tapointertothefunctionon64-bit.
* Make them const so the compiler knows they live in .text */ externvoid * const ret_from_kernel_thread; externvoid * const child_return;
if (unlikely(args->fn)) { /* kernel thread */
memset(cregs, 0, sizeof(struct pt_regs)); if (args->idle) /* idle thread */ return0; /* Must exit via ret_from_kernel_thread in order *tocallschedule_tail()
*/
cregs->ksp = (unsignedlong) stack + FRAME_SIZE + PT_SZ_ALGN;
cregs->kpc = (unsignedlong) &ret_from_kernel_thread; /* *Copyfunctionandargumenttobecalledfrom *ret_from_kernel_thread.
*/ #ifdef CONFIG_64BIT
cregs->gr[27] = ((unsignedlong *)args->fn)[3];
cregs->gr[26] = ((unsignedlong *)args->fn)[2]; #else
cregs->gr[26] = (unsignedlong) args->fn; #endif
cregs->gr[25] = (unsignedlong) args->fn_arg;
} else { /* user thread */ /* usp must be word aligned. This also prevents users from *passinginthevalue1(whichisthesignalforaspecial
* return for a kernel thread) */ if (usp) {
usp = ALIGN(usp, 4); if (likely(usp))
cregs->gr[30] = usp;
}
cregs->ksp = (unsignedlong) stack + FRAME_SIZE;
cregs->kpc = (unsignedlong) &child_return;
/* Setup thread TLS area */ if (clone_flags & CLONE_SETTLS)
cregs->cr27 = tls;
}
unwind_frame_init_from_blocked_task(&info, p); do { if (unwind_once(&info) < 0) return0; if (task_is_running(p)) return0;
ip = info.ip; if (!in_sched_functions(ip)) return ip;
} while (count++ < MAX_UNWIND_ENTRIES); return0;
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.14 Sekunden
(vorverarbeitet am 2026-09-27)
¤
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.