diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1998-06-27 18:51:49 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1998-06-27 18:51:49 +0000 |
commit | 5d18fb057a9158336a79953b88d481c74c6eb0ae (patch) | |
tree | 5762f11ed095f1236aa83bf386637423afb7638c /c/src/lib/libbsp/i386/pc386/startup/exit.c | |
parent | Monstrous patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>. I have (diff) | |
download | rtems-5d18fb057a9158336a79953b88d481c74c6eb0ae.tar.bz2 |
PC386 BSP enhancements from Aleksey Romanov (Quality Quorum
<qqi@world.std.com>). Unfortunately after merging these,
the pc386 will not boot using grub for for. It still does not
work using netboot for me. Here is his summary of changes:
rtems/c/src/lib/libbsp/i386/pc386/Makefile.in
Added support for new sub-directory
rtems/c/src/lib/libbsp/i386/pc386/bsp_specs
Made possible to build COFF image
rtems/c/src/lib/libbsp/i386/pc386/console/console.c
Added support for serial consoles, selectable by patching
binary image, added __assert(), use _IBMPC_inch_sleep()
instaed of _IMBPC_inch()
rtems/c/src/lib/libbsp/i386/pc386/console/inch.c
Added _IMBPC_inch_sleep()
rtems/c/src/lib/libbsp/i386/pc386/console/outch.c
Oops - just formatting
rtems/c/src/lib/libbsp/i386/pc386/include/Makefile.in
Added support for new files
rtems/c/src/lib/libbsp/i386/pc386/include/bsp.h
Added support for new features
rtems/c/src/lib/libbsp/i386/pc386/include/pc386uart.h
New file: definitions for serial ports
rtems/c/src/lib/libbsp/i386/pc386/include/pcibios.h
New file: definitions for PCI BIOS
rtems/c/src/lib/libbsp/i386/pc386/pc386dev/Makefile.in
New file: makefile in new directory
rtems/c/src/lib/libbsp/i386/pc386/pc386dev/i386-stub-glue.c
New file: i386-stub interface
rtems/c/src/lib/libbsp/i386/pc386/pc386dev/i386-stub.c
New file: i386-stub itself
rtems/c/src/lib/libbsp/i386/pc386/pc386dev/pc386uart.c
New file: serial ports
rtems/c/src/lib/libbsp/i386/pc386/pc386dev/pcibios.c
New file: PCI BIOS support
rtems/c/src/lib/libbsp/i386/pc386/start/start.s
Commented out DEBUG_EARLY stuff, everything is working fine
rtems/c/src/lib/libbsp/i386/pc386/start/start16.s
Cleaned up
rtems/c/src/lib/libbsp/i386/pc386/startup/bspstart.c
Added call to console_resereve_resources
rtems/c/src/lib/libbsp/i386/pc386/startup/exit.c
Added support for serial console
rtems/c/src/lib/libbsp/i386/pc386/startup/ldsegs.s
Fixed typo in comments
rtems/c/src/lib/libbsp/i386/pc386/tools/Makefile.in
Changed to reflect cnages in code
rtems/c/src/lib/libbsp/i386/pc386/tools/bin2boot.c
Trivialized, problem - I do not know how to make patch
remove obsolete files - there are a lot of them there
rtems/c/src/lib/libbsp/i386/pc386/tools/binpatch.c
New file: utility to do binary patches
rtems/c/src/lib/libbsp/i386/pc386/wrapup/Makefile.in
Added support for new directory
rtems/make/custom/pc386.cfg
Add COFF image building
Diffstat (limited to '')
-rw-r--r-- | c/src/lib/libbsp/i386/pc386/startup/exit.c | 49 |
1 files changed, 44 insertions, 5 deletions
diff --git a/c/src/lib/libbsp/i386/pc386/startup/exit.c b/c/src/lib/libbsp/i386/pc386/startup/exit.c index 85b5282c36..328a0afa76 100644 --- a/c/src/lib/libbsp/i386/pc386/startup/exit.c +++ b/c/src/lib/libbsp/i386/pc386/startup/exit.c @@ -33,8 +33,14 @@ #include <stdio.h> - #include <bsp.h> +#include <pc386uart.h> + +/*-------------------------------------------------------------------------+ + | Which console is in use: either (-1) which means normal console or + | uart id if uart was used + +-------------------------------------------------------------------------*/ +extern int PC386ConsolePort; /*-------------------------------------------------------------------------+ | External Prototypes @@ -50,11 +56,44 @@ extern rtems_boolean _IBMPC_scankey(char *); /* defined in 'inch.c' */ +--------------------------------------------------------------------------*/ void _exit(int status) { - unsigned char ch; - puts("\nEXECUTIVE SHUTDOWN! Any key to reboot..."); + unsigned char ch, *cp; + static char line[]="EXECUTIVE SHUTDOWN! Any key to reboot..."; + + if(PC386ConsolePort == PC386_CONSOLE_PORT_CONSOLE) + { - while(!_IBMPC_scankey(&ch)) - ; + printk("\n"); + printk(line); + while(!_IBMPC_scankey(&ch)) + ; + printk("\n\n"); + } + else + { + PC386_uart_intr_ctrl(PC386ConsolePort, PC386_UART_INTR_CTRL_DISABLE); + + PC386_uart_polled_write(PC386ConsolePort, '\r'); + PC386_uart_polled_write(PC386ConsolePort, '\n'); + + for(cp=line; *cp != 0; cp++) + { + PC386_uart_polled_write(PC386ConsolePort, *cp); + } + + PC386_uart_polled_read(PC386ConsolePort); + + PC386_uart_polled_write(PC386ConsolePort, '\r'); + PC386_uart_polled_write(PC386ConsolePort, '\n'); + PC386_uart_polled_write(PC386ConsolePort, '\r'); + PC386_uart_polled_write(PC386ConsolePort, '\n'); + } rtemsReboot(); } /* _exit */ + + + + + + + |