2008-09-22 Joel Sherrill <joel.sherrill@oarcorp.com>

* Makefile.am, configure.ac, console/inch.c, console/keyboard.c,
	include/bsp.h: Use standardized bsp_cleanup() which can optionally
	print a message, poll for user to press key, and call bsp_reset().
	Using this eliminates the various bsp_cleanup() implementations which
	had their own implementation and variety of string constants.
This commit is contained in:
Joel Sherrill
2008-09-22 21:49:43 +00:00
parent d4f6b30dcf
commit 084369e07a
6 changed files with 24 additions and 27 deletions

View File

@@ -1,3 +1,11 @@
2008-09-22 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac, console/inch.c, console/keyboard.c,
include/bsp.h: Use standardized bsp_cleanup() which can optionally
print a message, poll for user to press key, and call bsp_reset().
Using this eliminates the various bsp_cleanup() implementations which
had their own implementation and variety of string constants.
2008-09-18 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac, startup/bspstart.c, startup/linkcmds: Add

View File

@@ -80,8 +80,8 @@ pci_SOURCES = ../../i386/shared/pci/pcibios.c \
include_HEADERS += ../../i386/shared/comm/uart.h
startup_SOURCES = ../../shared/bsplibc.c ../../shared/bsppost.c \
../../shared/bsppredriverhook.c startup/bspgetworkarea.c \
../../shared/bsppretaskinghook.c \
startup/bspstart.c startup/bspclean.c ../../i386/shared/irq/idt.c \
../../shared/bsppretaskinghook.c startup/bspstart.c \
../../shared/bspclean.c startup/bspreset.c ../../i386/shared/irq/idt.c \
../../i386/shared/irq/irq.c ../../i386/shared/irq/irq_init.c \
../../shared/bootcard.c ../../shared/sbrk.c \
startup/ldsegs.S ../../i386/shared/irq/irq_asm.S

View File

@@ -58,6 +58,15 @@ RTEMS_CONFIG_BUILD_SUBDIRS(tools)
AC_SUBST(RTEMS_BSP)
RTEMS_BSPOPTS_SET([BSP_PRESS_KEY_FOR_RESET],[*],[1])
RTEMS_BSPOPTS_HELP([BSP_PRESS_KEY_FOR_RESET],
[If defined, print a message and wait until pressed before resetting
board when application exits.])
RTEMS_BSPOPTS_SET([BSP_RESET_BOARD_AT_EXIT],[*],[1])
RTEMS_BSPOPTS_HELP([BSP_RESET_BOARD_AT_EXIT],
[If defined, reset the board when the application exits.])
RTEMS_BSP_BOOTCARD_HANDLES_RAM_ALLOCATION
# Explicitly list all Makefiles here

View File

@@ -30,6 +30,7 @@
+--------------------------------------------------------------------------*/
#include <bsp.h>
#include <bsp/bootcard.h>
#include <bsp/irq.h>
/*-------------------------------------------------------------------------+
@@ -71,19 +72,6 @@ static uint16_t kbd_first = 0;
static uint16_t kbd_last = 0;
static uint16_t kbd_end = KBD_BUF_SIZE - 1;
/*-------------------------------------------------------------------------+
| Function: rtemsReboot
| Description: Reboot the PC.
| Global Variables: None.
| Arguments: None.
| Returns: Nothing.
+--------------------------------------------------------------------------*/
void rtemsReboot(void)
{
/* shutdown and reboot */
outport_byte(0x64, 0xFE); /* use keyboard controler to do the job... */
} /* rtemsReboot */
/*-------------------------------------------------------------------------+
| Function: _IBMPC_scankey
| Description: This function can be called during a poll for input, or by
@@ -174,7 +162,7 @@ _IBMPC_scankey(char *outChar)
case 0x53:
if (ctrl_pressed && alt_pressed)
rtemsReboot(); /* ctrl+alt+del -> reboot */
bsp_reset(); /* ctrl+alt+del -> reboot */
break;
/*

View File

@@ -10,6 +10,7 @@
#include "i386kbd.h"
#include <rtems/kd.h>
#include <bsp.h>
#include <bsp/bootcard.h>
#define SIZE(x) (sizeof(x)/sizeof((x)[0]))
@@ -30,7 +31,6 @@
#endif
extern void add_to_queue( unsigned short );
extern void rtemsReboot( void );
int set_bit(int nr, unsigned long * addr)
{
@@ -134,14 +134,14 @@ static void show_state(void)
}
static void_fn do_null, enter, show_ptregs, send_intr, lastcons, caps_toggle,
num, hold, scroll_forw, scroll_back, boot_it, caps_on, compose,
num, hold, scroll_forw, scroll_back, caps_on, compose,
SAK, decr_console, incr_console, spawn_console, bare_num;
static void_fnp spec_fn_table[] = {
do_null, enter, show_ptregs, show_mem,
show_state, send_intr, lastcons, caps_toggle,
num, hold, scroll_forw, scroll_back,
boot_it, caps_on, compose, SAK,
bsp_reset, caps_on, compose, SAK,
decr_console, incr_console, spawn_console, bare_num
};
@@ -455,12 +455,6 @@ static void scroll_back(void)
{
}
static void boot_it(void)
{
printk( "boot_it() " );
rtemsReboot();
}
static void compose(void)
{
dead_key_next = 1;

View File

@@ -175,8 +175,6 @@ void _IBMPC_outch (char); /* from 'outch.c' */
char _IBMPC_inch (void); /* from 'inch.c' */
char _IBMPC_inch_sleep (void); /* from 'inch.c' */
void rtemsReboot(void); /* from 'exit.c' */
void Wait_X_ms(unsigned int timeToWait); /* from 'timer.c' */
/* Definitions for BSPConsolePort */