Index: c/src/lib/libbsp/i386/pc386/ChangeLog
===================================================================
--- c/src/lib/libbsp/i386/pc386/ChangeLog	(revision 1fc2292d3590e154edb86ac9e0361a6156f8df72)
+++ c/src/lib/libbsp/i386/pc386/ChangeLog	(revision 664db30bd38371a14c82d61f78dde7db2cbed41d)
@@ -1,2 +1,8 @@
+2000-10-18	 Charles-Antoine Gauthier <charles.gauthier@nrc.ca>
+
+	* console/console.c, console/serial_mouse.c, include/bsp.h:
+	Add the ability to set parity, number of data bits and
+	number of stop bits to the existing i386 serial drivers.
+
 2000-10-17	Joel Sherrill <joel@OARcorp.com>
 
Index: c/src/lib/libbsp/i386/pc386/console/console.c
===================================================================
--- c/src/lib/libbsp/i386/pc386/console/console.c	(revision 1fc2292d3590e154edb86ac9e0361a6156f8df72)
+++ c/src/lib/libbsp/i386/pc386/console/console.c	(revision 664db30bd38371a14c82d61f78dde7db2cbed41d)
@@ -227,5 +227,5 @@
        */
       /* 9600-8-N-1 */
-      BSP_uart_init(BSPConsolePort, 9600, 0);
+      BSP_uart_init(BSPConsolePort, 9600, CHR_8_BITS, 0, 0, 0);
       
       
@@ -455,5 +455,5 @@
 conSetAttr(int minor, const struct termios *t)
 {
-  int baud;
+  unsigned long baud, databits, parity, stopbits;
 
   switch (t->c_cflag & CBAUD) 
@@ -511,10 +511,41 @@
       break;
     default:
-      baud = 0;
       rtems_fatal_error_occurred (RTEMS_INTERNAL_ERROR);
       return 0;
     }
 
-  BSP_uart_set_baud(BSPConsolePort, baud);
+  if (t->c_cflag & PARENB) {
+    /* Parity is enabled */
+    if (t->c_cflag & PARODD) {
+      /* Parity is odd */
+      parity = PEN;
+    }
+    else {
+      /* Parity is even */
+      parity = PEN | EPS;
+    }
+  }
+  else {
+    /* No parity */
+    parity = 0;
+  }
+  
+  switch (t->c_cflag & CSIZE) {
+    case CS5: databits = CHR_5_BITS; break;
+    case CS6: databits = CHR_6_BITS; break;
+    case CS7: databits = CHR_7_BITS; break;
+    case CS8: databits = CHR_8_BITS; break;
+   }
+
+  if (t->c_cflag & CSTOPB) {
+    /* 2 stop bits */
+    stopbits = STB;
+  }
+  else {
+    /* 1 stop bit */
+    stopbits = 0;
+  }
+
+  BSP_uart_set_attributes(BSPConsolePort, baud, databits, parity, stopbits);
 
   return 0;
Index: c/src/lib/libbsp/i386/pc386/console/serial_mouse.c
===================================================================
--- c/src/lib/libbsp/i386/pc386/console/serial_mouse.c	(revision 1fc2292d3590e154edb86ac9e0361a6156f8df72)
+++ c/src/lib/libbsp/i386/pc386/console/serial_mouse.c	(revision 664db30bd38371a14c82d61f78dde7db2cbed41d)
@@ -19,4 +19,37 @@
  *
  * $Log$
+ * Revision 1.1  2000/08/30 08:15:30  joel
+ * 2000-08-26  Rosimildo da Silva  <rdasilva@connecttel.com>
+ *
+ * 	* Major rework of the "/dev/console" driver.
+ * 	* Added termios support for stdin ( keyboard ).
+ * 	* Added ioctls() to support modes similar to Linux( XLATE,
+ * 	RAW, MEDIUMRAW ).
+ * 	* Added Keyboard mapping and handling of the keyboard's leds.
+ * 	* Added Micro FrameBuffer driver ( "/dev/fb0" ) for bare VGA
+ * 	controller ( 16 colors ).
+ * 	* Added PS/2 and Serial mouse support for PC386 BSP.
+ * 	* console/defkeymap.c: New file.
+ * 	* console/fb_vga.c: New file.
+ * 	* console/fb_vga.h: New file.
+ * 	* console/i386kbd.h: New file.
+ * 	* console/kd.h: New file.
+ * 	* console/keyboard.c: New file.
+ * 	* console/keyboard.h: New file.
+ * 	* console/mouse_parser.c: New file.
+ * 	* console/mouse_parser.h: New file.
+ * 	* console/pc_keyb.c: New file.
+ * 	* console/ps2_drv.h: New file.
+ * 	* console/ps2_mouse.c: New file.
+ * 	* console/ps2_mouse.h: New file.
+ * 	* console/serial_mouse.c: New file.
+ * 	* console/serial_mouse.h: New file.
+ * 	* console/vgainit.c: New file.
+ * 	* console/vt.c: New file.
+ * 	* console/Makefile.am: Reflect new files.
+ * 	* console/console.c, console/inch.c, console/outch.c: Console
+ * 	functionality modifications.
+ * 	* startup/Makefile.am: Pick up tty_drv.c and gdb_glue.c
+ *
  ****************************************************************************/
 
@@ -127,5 +160,5 @@
    */
   /* 9600-8-N-1, without hardware flow control */
-  BSP_uart_init( BSP_UART_PORT, 1200, 0 );
+  BSP_uart_init( BSP_UART_PORT, 1200, CHR_8_BITS, 0, 0, 0 );
   status = BSP_install_rtems_irq_handler( &serial_mouse_isr_data );
   if( !status )
Index: c/src/lib/libbsp/i386/pc386/include/bsp.h
===================================================================
--- c/src/lib/libbsp/i386/pc386/include/bsp.h	(revision 1fc2292d3590e154edb86ac9e0361a6156f8df72)
+++ c/src/lib/libbsp/i386/pc386/include/bsp.h	(revision 664db30bd38371a14c82d61f78dde7db2cbed41d)
@@ -61,5 +61,10 @@
 
 #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 1
+
+#if STACK_MINIMUM_SIZE < (4 * 1024)
 #define CONFIGURE_INTERRUPT_STACK_MEMORY  (4 * 1024)
+#else
+#define CONFIGURE_INTERRUPT_STACK_MEMORY STACK_MINIMUM_SIZE
+#endif
 
 /*
