various kernel printing fixes

. remove some call cycles by low-level functions invoking printf(); e.g.
	  send_sig() gets a return value that the caller should check
	. reason: very-early-phase printf() would trigger a printf() causing
	  infinite recursion -> GPF
	. move serial initialization a little earlier so DEBUG_EXTRA works for
	  serial earlier (e.g. its first instance, for "cstart")
	. closes tracker item 583:
	  System Fails to Complete Startup with Verbose 2 and 3 Boot Parameters,
	  reported by Stephen Hatton / pikpik.
This commit is contained in:
Ben Gras
2012-03-28 18:23:12 +02:00
parent 36db008cb5
commit 1e399dd8bd
6 changed files with 28 additions and 36 deletions
+11 -11
View File
@@ -56,6 +56,17 @@ void cstart(
system_hz = DEFAULT_HZ;
#endif
#ifdef DEBUG_SERIAL
/* Intitialize serial debugging */
value = env_get(SERVARNAME);
if(value && atoi(value) == 0) {
do_serial_debug=1;
value = env_get(SERBAUDVARNAME);
if (value) serial_debug_baud = atoi(value);
}
#endif
DEBUGEXTRA(("cstart\n"));
/* Record miscellaneous information for user-space servers. */
@@ -72,17 +83,6 @@ void cstart(
for(h = 0; h < _LOAD_HISTORY; h++)
kloadinfo.proc_load_history[h] = 0;
#ifdef DEBUG_SERIAL
/* Intitialize serial debugging */
value = env_get(SERVARNAME);
if(value && atoi(value) == 0) {
do_serial_debug=1;
value = env_get(SERBAUDVARNAME);
if (value) serial_debug_baud = atoi(value);
}
#endif
#ifdef USE_APIC
value = env_get("no_apic");
if(value)