summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/powerpc
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
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 'c/src/lib/libbsp/powerpc')
-rw-r--r--c/src/lib/libbsp/powerpc/ChangeLog5
-rw-r--r--c/src/lib/libbsp/powerpc/shared/startup/bspstart.c31
2 files changed, 21 insertions, 15 deletions
diff --git a/c/src/lib/libbsp/powerpc/ChangeLog b/c/src/lib/libbsp/powerpc/ChangeLog
index fc6cd3853f..79881ea8d8 100644
--- a/c/src/lib/libbsp/powerpc/ChangeLog
+++ b/c/src/lib/libbsp/powerpc/ChangeLog
@@ -1,5 +1,10 @@
2011-07-18 Till Straumann <strauman@slac.stanford.edu>
+ * shared/startup/bspstart.c: Select console *before* doing
+ any potential printk() (e.g., panic).
+
+2011-07-18 Till Straumann <strauman@slac.stanford.edu>
+
* shared/startup/ppc_idle.c: Need to enable HID0[NAP] on
a 7400/7455/7457 for MSR[POW] to have an effect.
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");