summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/powerpc/shared/startup/bspstart.c
diff options
context:
space:
mode:
authorTill Straumann <strauman@slac.stanford.edu>2011-07-18 16:35:08 +0000
committerTill Straumann <strauman@slac.stanford.edu>2011-07-18 16:35:08 +0000
commit4b6692f270533aba435ebb74866c5b117b4d4334 (patch)
tree6a4aa0ca55a9ea3db4444e539321838bd0bc2995 /c/src/lib/libbsp/powerpc/shared/startup/bspstart.c
parent2011-07-18 Till Straumann <strauman@slac.stanford.edu> (diff)
downloadrtems-4b6692f270533aba435ebb74866c5b117b4d4334.tar.bz2
2011-07-18 Till Straumann <strauman@slac.stanford.edu>
* shared/startup/bspstart.c: Select console *before* doing any potential printk() (e.g., panic).
Diffstat (limited to '')
-rw-r--r--c/src/lib/libbsp/powerpc/shared/startup/bspstart.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/c/src/lib/libbsp/powerpc/shared/startup/bspstart.c b/c/src/lib/libbsp/powerpc/shared/startup/bspstart.c
index 274809623d..08ce5f5bd8 100644
--- a/c/src/lib/libbsp/powerpc/shared/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/shared/startup/bspstart.c
@@ -196,6 +196,22 @@ void bsp_start( void )
*/
L1_caches_enables();
+ select_console(CONSOLE_LOG);
+
+ /*
+ * We check that the keyboard is present and immediately
+ * select the serial console if not.
+ */
+#if defined(BSP_KBD_IOBASE)
+ { int err;
+ err = kbdreset();
+ if (err) select_console(CONSOLE_SERIAL);
+ }
+#else
+ select_console(CONSOLE_SERIAL);
+#endif
+
+
#if !defined(mvme2100)
/*
* Enable L2 Cache. Note that the set_L2CR(L2CR) codes checks for
@@ -227,21 +243,6 @@ void bsp_start( void )
BSP_panic("cannot initialize exceptions");
}
- select_console(CONSOLE_LOG);
-
- /*
- * We check that the keyboard is present and immediately
- * select the serial console if not.
- */
-#if defined(BSP_KBD_IOBASE)
- { int err;
- err = kbdreset();
- if (err) select_console(CONSOLE_SERIAL);
- }
-#else
- select_console(CONSOLE_SERIAL);
-#endif
-
boardManufacturer = checkPrepBoardType(&residualCopy);
if (boardManufacturer != PREP_Motorola) {
printk("Unsupported hardware vendor\n");