forked from Imagelibrary/rtems
bsps: Add fatal source/code to bsp_reset()
Mark bsp_reset() as no-return. Use default BSP fatal handler in lm32 and m68k BSPs. Remove empty bsp_reset() implementation. Update #5067.
This commit is contained in:
committed by
Joel Sherrill
parent
aeae283541
commit
002c6067ba
@@ -26,18 +26,21 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <rtems.h>
|
||||
#include <bsp/bootcard.h>
|
||||
#include <libcpu/au1x00.h>
|
||||
|
||||
void bsp_reset(void)
|
||||
void bsp_reset( rtems_fatal_source source, rtems_fatal_code code )
|
||||
{
|
||||
void (*reset_func)(void);
|
||||
|
||||
(void) source;
|
||||
(void) code;
|
||||
|
||||
reset_func = (void *)0xbfc00000;
|
||||
|
||||
mips_set_sr( 0x00200000 ); /* all interrupts off, boot exception vectors */
|
||||
|
||||
/* Try to restart bootloader */
|
||||
reset_func();
|
||||
RTEMS_UNREACHABLE();
|
||||
}
|
||||
|
||||
@@ -32,13 +32,15 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <rtems.h>
|
||||
#include <bsp/bootcard.h>
|
||||
|
||||
void bsp_reset(void)
|
||||
void bsp_reset( rtems_fatal_source source, rtems_fatal_code code )
|
||||
{
|
||||
uint32_t *reset;
|
||||
|
||||
(void) source;
|
||||
(void) code;
|
||||
|
||||
reset= (uint32_t *)0x9F000500;
|
||||
/*
|
||||
* Qemu understands 0x42 to reset simulated machine.
|
||||
@@ -50,4 +52,5 @@ void bsp_reset(void)
|
||||
*/
|
||||
// *reset = 0x42;
|
||||
*reset = 0xFF;
|
||||
RTEMS_UNREACHABLE();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user