diff options
author | Till Straumann <strauman@slac.stanford.edu> | 2011-07-18 16:35:08 +0000 |
---|---|---|
committer | Till Straumann <strauman@slac.stanford.edu> | 2011-07-18 16:35:08 +0000 |
commit | 4b6692f270533aba435ebb74866c5b117b4d4334 (patch) | |
tree | 6a4aa0ca55a9ea3db4444e539321838bd0bc2995 | |
parent | 2011-07-18 Till Straumann <strauman@slac.stanford.edu> (diff) | |
download | rtems-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).
-rw-r--r-- | c/src/lib/libbsp/powerpc/ChangeLog | 5 | ||||
-rw-r--r-- | c/src/lib/libbsp/powerpc/shared/startup/bspstart.c | 31 |
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"); |