Ignore:
Timestamp:
08/31/98 23:03:45 (24 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
d9d75fc
Parents:
de9edc4
Message:

Patch from Eric Valette <valette@…>:

Eric> NB : there is still a bug on PC386 serial line : exit does not
Eric> flush the remaining output queue. As this is not a bug in the
Eric> driver itself but somewhere in PC386 initialization/termios
Eric> relationship it will be part of another patch.

Eric> NB2 : As Emmanuel excerced the exception hanlder code, while
Eric> porting the SMC driver to the new BSD stack, we found a bug
Eric> in the exception handler : it shall not delete the current
Eric> thread in case we are running at interrupt level. This will
Eric> be part of another patch...

So here is the patch. This patch fixes the two problems mentionned above

+ it use vpath mechanism intead of copying the irq related files in

the right directory. This avoid to compile them each time and is
more homogenous with other Makefiles.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/i386/pc386/startup/exit.c

    rde9edc4 rb285860  
    3838#include <pc386uart.h>
    3939
    40 /*-------------------------------------------------------------------------+
    41  | Which console is in use: either (-1) which means normal console or
    42  | uart id if uart was used
    43  +-------------------------------------------------------------------------*/
    44 extern int PC386ConsolePort;
    45 
    46 /*-------------------------------------------------------------------------+
    47 | External Prototypes
    48 +--------------------------------------------------------------------------*/
    49 extern rtems_boolean _IBMPC_scankey(char *);  /* defined in 'inch.c' */
    50 
    51 /*-------------------------------------------------------------------------+
    52 |         Function: _exit
    53 |      Description: Shutdown the PC. Called from libc's 'exit'.
    54 | Global Variables: None.
    55 |        Arguments: status - exit status (ignored).
    56 |          Returns: Nothing.
    57 +--------------------------------------------------------------------------*/
    58 void _exit(int status)
     40void bsp_cleanup()
    5941{
    60   unsigned char ch, *cp;
     42  unsigned char ch;
    6143  static   char line[]="EXECUTIVE SHUTDOWN! Any key to reboot...";
    62 
    63   if(PC386ConsolePort == PC386_CONSOLE_PORT_CONSOLE)
    64     {
    65 
    66       printk("\n");
    67       printk(line);
    68       while(!_IBMPC_scankey(&ch))
    69         ;
    70       printk("\n\n");
    71     }
    72   else
    73     {
    74       /* Close console */
    75       __rtems_close(2);
    76       __rtems_close(1);
    77       __rtems_close(0);
    78 
    79       PC386_uart_intr_ctrl(PC386ConsolePort, PC386_UART_INTR_CTRL_DISABLE);
    80      
    81       PC386_uart_polled_write(PC386ConsolePort, '\r');
    82       PC386_uart_polled_write(PC386ConsolePort, '\n');
    83      
    84       for(cp=line; *cp != 0; cp++)
    85         {
    86           PC386_uart_polled_write(PC386ConsolePort, *cp);
    87         }
    88 
    89       PC386_uart_polled_read(PC386ConsolePort);
    90 
    91       PC386_uart_polled_write(PC386ConsolePort, '\r');
    92       PC386_uart_polled_write(PC386ConsolePort, '\n');
    93       PC386_uart_polled_write(PC386ConsolePort, '\r');
    94       PC386_uart_polled_write(PC386ConsolePort, '\n');
    95     }
    96 
     44  /*
     45   * AT this point, the console driver is disconnected => we must
     46   * use polled output/input. This is exactly what printk
     47   * does.
     48   */
     49  printk("\n");
     50  printk(line);
     51  ch = BSP_poll_char();
    9752  rtemsReboot();
    98 } /* _exit */
     53}
    9954
    10055
     
    10257
    10358
    104 
    105 
Note: See TracChangeset for help on using the changeset viewer.