From 8babe99254592361fc886431488289ea058e55cc Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 13 Jul 2011 18:35:56 +0000 Subject: 2011-07-13 Joel Sherrill PR 1824/cpukit * bsp_howto/init.t, bsp_howto/support.t, user/init.t: Return exit/shutdown status back to boot_card(). --- doc/ChangeLog | 6 ++++++ doc/bsp_howto/init.t | 2 +- doc/bsp_howto/support.t | 21 +++++++++++++-------- doc/user/init.t | 5 +++-- 4 files changed, 23 insertions(+), 11 deletions(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index 45ec5ea7c4..d57fd408d8 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,9 @@ +2011-07-13 Joel Sherrill + + PR 1824/cpukit + * bsp_howto/init.t, bsp_howto/support.t, user/init.t: Return + exit/shutdown status back to boot_card(). + 2011-05-23 Joel Sherrill * bsp_howto/support.t: Update copyright. diff --git a/doc/bsp_howto/init.t b/doc/bsp_howto/init.t index 296f69b5d0..1d8fe41bcf 100644 --- a/doc/bsp_howto/init.t +++ b/doc/bsp_howto/init.t @@ -97,7 +97,7 @@ RTEMS, device driver initialization phases, and the context switch to the first application task. After this, the application executes until it calls @code{exit}, @code{rtems_shutdown_executive}, or some other normal termination initiating routine and control is returned -to @code{bootcard.c} which allows the BSP to perform some clanup in C +to @code{bootcard.c} which allows the BSP to perform some cleanup in C (@code{bsp_cleanup}) and then @code{boot_card} returns to the assembly language which initially invoked it. diff --git a/doc/bsp_howto/support.t b/doc/bsp_howto/support.t index a87b3196cc..13cfb4550d 100644 --- a/doc/bsp_howto/support.t +++ b/doc/bsp_howto/support.t @@ -182,7 +182,7 @@ this operation. @findex CONFIGURE_MALLOC_BSP_SUPPORTS_SBRK If your BSP does not want to support dynamic heap extension, then you do not have to do anything special. However, if you want to support @code{sbrk}, you must provide an implementation of this method and define @code{CONFIGURE_MALLOC_BSP_SUPPORTS_SBRK} in @code{bsp.h}. This informs @code{rtems/confdefs.h} to configure the Malloc Family Extensions which support @code{sbrk}. -@section bsp_cleanup() - Cleanup the Hardware +@section bsp_cleanup(uint32_t status) - Cleanup the Hardware The @code{bsp_cleanup()} is the last C code invoked. Most of the BSPs use the same shared version of @code{bsp_cleanup()} that does nothing. @@ -194,13 +194,18 @@ c/src/lib/libbsp/shared/bspclean.c The @code{bsp_cleanup()} routine can be used to return to a ROM monitor, insure that interrupt sources are disabled, etc.. This routine is the -last place to insure a clean shutdown of the hardware. On some BSPs, -it prints a message indicating that the application completed execution -and waits for the user to press a key before resetting the board. -The PowerPC/gen83xx and PowerPC/gen5200 BSPs do this when they are built -to support the FreeScale evaluation boards. This is convenient when -using the boards in a development environment and may be disabled for -production use. +last place to ensure a clean shutdown of the hardware. The @code{status} +argument is the value passed to the service which initiated shutting +down RTEMS. All of the non-fatal shutdown sequences ultimately pass +their exit status to @code{rtems_shutdown_executive} and this is what +is passed to this routine. + +On some BSPs, it prints a message indicating that the application +completed execution and waits for the user to press a key before +resetting the board. The PowerPC/gen83xx and PowerPC/gen5200 BSPs do +this when they are built to support the FreeScale evaluation boards. +This is convenient when using the boards in a development environment +and may be disabled for production use. @section Configuration Macros diff --git a/doc/user/init.t b/doc/user/init.t index ee23fb0f58..c5987632dd 100644 --- a/doc/user/init.t +++ b/doc/user/init.t @@ -349,7 +349,7 @@ the first context switch. @ifset is-C @findex rtems_initialize_start_multitasking @example -void rtems_initialize_start_multitasking(void); +uint32_t rtems_initialize_start_multitasking(void); @end example @end ifset @@ -361,7 +361,8 @@ NOT SUPPORTED FROM Ada BINDING @subheading DIRECTIVE STATUS CODES: -NONE +This directive returns the status code passed in to the +@code{@value{DIRPREFIX}shutdown_executive}. @subheading DESCRIPTION: -- cgit v1.2.3