/* * This handles the selection of the console after the devices are * initialized. */ void bsp_console_select(void) { #ifdef RTEMS_RUNTIME_CONSOLE_SELECT /* * WARNING: This code is really needed any more and should be removed. * references to COM1 and COM2 like they are wrong. */ if ( BSP_runtime_console_select ) BSP_runtime_console_select(&BSPPrintkPort, &Console_Port_Minor); /* * If no video card, fall back to serial port console */ if((Console_Port_Minor == BSP_CONSOLE_VGA) && (*(unsigned char*) NB_MAX_ROW_ADDR == 0) && (*(unsigned short*)NB_MAX_COL_ADDR == 0)) { Console_Port_Minor = BSP_CONSOLE_COM2; BSPPrintkPort = BSP_CONSOLE_COM1; } #endif /* * If the device that was selected isn't available then * let the user know and select the first available device. */ if ( !bsp_Is_Available( Console_Port_Minor ) ) { printk( "Error finding %s setting console to first available\n", get_name(Console_Port_Minor) ); Console_Port_Minor = bsp_First_Available_Device(); } }
void bsp_console_select(void) { /* * Reset Console_Port_Minor and * BSPPrintkPort here if desired. * * This default version allows the bsp to set these * values at creation and will not touch them again * unless the selected port number is not available. */ /* * If the device that was selected isn't available then * let the user know and select the first available device. */ if ( !bsp_Is_Available( Console_Port_Minor ) ) { printk( "Error finding %s setting console to first available\n", Console_Port_Tbl[Console_Port_Minor]->sDeviceName ); Console_Port_Minor = bsp_First_Available_Device(); } }