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:
Sebastian Huber
2024-08-23 14:54:37 +00:00
committed by Joel Sherrill
parent aeae283541
commit 002c6067ba
95 changed files with 256 additions and 247 deletions
+5 -1
View File
@@ -34,7 +34,11 @@
#include <bsp/bootcard.h>
#include <bsp/alt_reset_manager.h>
void bsp_reset(void)
void bsp_reset( rtems_fatal_source source, rtems_fatal_code code )
{
(void) source;
(void) code;
alt_reset_cold_reset();
RTEMS_UNREACHABLE();
}
+4 -1
View File
@@ -21,7 +21,7 @@
#define DM37XX_PRM_RSTCTRL_REG 0x250
#define DM37XX_RST_DPLL3_BIT 2
void bsp_reset(void)
void bsp_reset( rtems_fatal_source source, rtems_fatal_code code )
{
#if IS_DM3730
static uint32_t reset_base = DM37XX_CM_BASE;
@@ -39,4 +39,7 @@ void bsp_reset(void)
(1 << AM335X_RST_GLOBAL_WARM_SW_BIT));
}
#endif
(void) source;
(void) code;
}
+4 -1
View File
@@ -16,10 +16,13 @@
#include <at91rm9200_pmc.h>
#include <at91rm9200_emac.h>
void bsp_reset(void)
void bsp_reset( rtems_fatal_source source, rtems_fatal_code code )
{
rtems_interrupt_level level;
(void) source;
(void) code;
rtems_interrupt_disable(level);
(void) level; /* avoid set but not used warning */
+5 -1
View File
@@ -10,8 +10,11 @@
#include <bsp/bootcard.h>
#include <ep7312.h>
void bsp_reset(void)
void bsp_reset( rtems_fatal_source source, rtems_fatal_code code )
{
(void) source;
(void) code;
#if ON_SKYEYE == 1
#define SKYEYE_MAGIC_ADDRESS (*(volatile unsigned int *)(0xb0000000))
@@ -19,4 +22,5 @@ void bsp_reset(void)
#else
__asm__ volatile ("b _start");
#endif
RTEMS_UNREACHABLE();
}
+4 -1
View File
@@ -40,8 +40,11 @@
#include <bsp/bootcard.h>
#include <bsp/semihosting.h>
void bsp_reset( void )
void bsp_reset( rtems_fatal_source source, rtems_fatal_code code )
{
(void) source;
(void) code;
while ( true ) {
(void) arm_fvp_semihosting_call( SYS_EXIT, ADP_Stopped_ApplicationExit );
}
+5 -1
View File
@@ -10,9 +10,13 @@
#include <bsp/bootcard.h>
#include <pxa255.h>
void bsp_reset( void )
void bsp_reset( rtems_fatal_source source, rtems_fatal_code code )
{
(void) source;
(void) code;
#if ON_SKYEYE == 1
SKYEYE_MAGIC_ADDRESS = 0xff;
#endif
RTEMS_UNREACHABLE();
}
+4 -1
View File
@@ -29,10 +29,13 @@
#include <bsp.h>
#include <arm/freescale/imx/imx_wdogreg.h>
void bsp_reset(void)
void bsp_reset( rtems_fatal_source source, rtems_fatal_code code )
{
volatile uint16_t *pcr;
(void) source;
(void) code;
imx_uart_console_drain();
pcr = (volatile uint16_t *) 0x30280000;
+6 -3
View File
@@ -34,7 +34,6 @@
*/
#include <rtems.h>
#include <rtems/score/armv7m.h>
#include <bsp/bootcard.h>
#include <bsp/lpc24xx.h>
@@ -42,12 +41,16 @@
#ifdef ARM_MULTILIB_ARCH_V4
BSP_START_TEXT_SECTION __attribute__((flatten)) void bsp_reset(void)
BSP_START_TEXT_SECTION __attribute__((flatten)) void
bsp_reset( rtems_fatal_source source, rtems_fatal_code code )
{
rtems_interrupt_level level;
(void) level;
(void) source;
(void) code;
rtems_interrupt_disable(level);
(void) level;
/* Trigger watchdog reset */
WDCLKSEL = 0;
+4 -3
View File
@@ -33,8 +33,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <stdbool.h>
#include <bspopts.h>
#include <bsp/bootcard.h>
#include <bsp/lpc32xx.h>
@@ -51,8 +49,11 @@ static void watchdog_reset(void)
#endif
}
void bsp_reset( void)
void bsp_reset( rtems_fatal_source source, rtems_fatal_code code )
{
(void) source;
(void) code;
watchdog_reset();
while (true) {
+4 -2
View File
@@ -9,12 +9,14 @@
#include <bsp/bootcard.h>
#include <bsp/raspberrypi.h>
#include <bsp.h>
#include <rtems.h>
void bsp_reset(void)
void bsp_reset( rtems_fatal_source source, rtems_fatal_code code )
{
uint32_t rstc;
(void) source;
(void) code;
BCM2835_REG(BCM2835_PM_WDOG) = BCM2835_PM_PASSWD_MAGIC | 20;
rstc = BCM2835_REG(BCM2835_PM_RSTC);
rstc &= ~BCM2835_PM_RSTC_WRCFG;
+4 -1
View File
@@ -27,11 +27,14 @@
#include <bsp/bootcard.h>
void bsp_reset(void)
void bsp_reset( rtems_fatal_source source, rtems_fatal_code code )
{
volatile uint32_t *sys_lock = (volatile uint32_t *) 0x10000020;
volatile uint32_t *sys_resetctl = (volatile uint32_t *) 0x10000040;
(void) source;
(void) code;
while (true) {
*sys_lock = 0xa05f;
*sys_resetctl = 0xf4;
+5 -2
View File
@@ -10,7 +10,7 @@
#include <bsp/bootcard.h>
#include <lpc22xx.h>
void bsp_reset(void)
void bsp_reset( rtems_fatal_source source, rtems_fatal_code code )
{
#if ON_SKYEYE == 1
#define SKYEYE_MAGIC_ADDRESS (*(volatile unsigned int *)(0xb0000000))
@@ -19,8 +19,8 @@ void bsp_reset(void)
#else
rtems_interrupt_level level;
(void) level;
rtems_interrupt_disable(level);
(void) level;
#ifdef __thumb__
int tmp;
@@ -34,4 +34,7 @@ void bsp_reset(void)
#endif
while(1);
#endif
(void) source;
(void) code;
}
+5 -1
View File
@@ -33,10 +33,14 @@
#ifdef ARM_MULTILIB_ARCH_V7M
BSP_START_TEXT_SECTION __attribute__((flatten)) void bsp_reset(void)
BSP_START_TEXT_SECTION __attribute__((flatten)) void
bsp_reset( rtems_fatal_source source, rtems_fatal_code code )
{
rtems_interrupt_level level;
(void) source;
(void) code;
rtems_interrupt_local_disable(level);
(void) level;
+7 -2
View File
@@ -9,8 +9,11 @@
#include <bsp.h>
#include <bsp/bootcard.h>
void bsp_reset(void)
void bsp_reset( rtems_fatal_source source, rtems_fatal_code code )
{
(void) source;
(void) code;
#if ON_SKYEYE == 1
#define SKYEYE_MAGIC_ADDRESS (*(volatile unsigned int *)(0xb0000000))
@@ -22,8 +25,8 @@ void bsp_reset(void)
*/
rtems_interrupt_level level;
(void) level;
rtems_interrupt_disable(level);
(void) level;
/* disable mmu, invalide i-cache and call swi #4 */
__asm__ volatile(""
"mrc p15,0,r0,c1,c0,0 \n"
@@ -48,4 +51,6 @@ void bsp_reset(void)
);
/* we should be back in bios now */
#endif
RTEMS_UNREACHABLE();
}
+5 -2
View File
@@ -10,12 +10,15 @@
#include <bsp/bootcard.h>
void bsp_reset(void)
void bsp_reset( rtems_fatal_source source, rtems_fatal_code code )
{
rtems_interrupt_level level;
(void) level;
(void) source;
(void) code;
rtems_interrupt_disable(level);
(void) level;
while (1);
}
+3 -3
View File
@@ -57,7 +57,7 @@ void stm32h7_init_oscillator(void)
status = HAL_RCC_OscConfig(&stm32h7_config_oscillator);
if (status != HAL_OK) {
bsp_reset();
bsp_reset(RTEMS_FATAL_SOURCE_BSP, 0);
}
}
@@ -70,7 +70,7 @@ void stm32h7_init_clocks(void)
stm32h7_config_flash_latency
);
if (status != HAL_OK) {
bsp_reset();
bsp_reset(RTEMS_FATAL_SOURCE_BSP, 0);
}
}
@@ -80,7 +80,7 @@ void stm32h7_init_peripheral_clocks(void)
status = HAL_RCCEx_PeriphCLKConfig(&stm32h7_config_peripheral_clocks);
if (status != HAL_OK) {
bsp_reset();
bsp_reset(RTEMS_FATAL_SOURCE_BSP, 0);
}
}
+5 -1
View File
@@ -55,11 +55,14 @@ static void handle_esm_errors(uint32_t esm_irq_channel)
}
}
void bsp_reset(void)
void bsp_reset( rtems_fatal_source source, rtems_fatal_code code )
{
rtems_interrupt_level level;
uint32_t esm_irq_channel;
(void) source;
(void) code;
rtems_interrupt_disable(level);
(void) level;
@@ -73,4 +76,5 @@ void bsp_reset(void)
/* Reset the board */
/* write of value other than 1 cause system reset */
TMS570_SYS1.SYSECR = TMS570_SYS1_SYSECR_RESET(2);
RTEMS_UNREACHABLE();
}
+4 -1
View File
@@ -37,13 +37,16 @@
#include <bsp/bootcard.h>
#include <dev/serial/zynq-uart-regs.h>
void bsp_reset(void)
void bsp_reset( rtems_fatal_source source, rtems_fatal_code code )
{
volatile zynq_uart *regs =
(volatile zynq_uart *) ZYNQ_UART_KERNEL_IO_BASE_ADDR;
volatile uint32_t *slcr_unlock = (volatile uint32_t *) 0xf8000008;
volatile uint32_t *pss_rst_ctrl = (volatile uint32_t *) 0xf8000200;
(void) source;
(void) code;
zynq_uart_reset_tx_flush(regs);
while (true) {
+4 -1
View File
@@ -33,8 +33,11 @@
#include <bsp.h>
#include <bsp/bootcard.h>
void bsp_reset(void)
void bsp_reset( rtems_fatal_source source, rtems_fatal_code code )
{
(void) source;
(void) code;
zynqmp_debug_console_flush();
while (true) {
+4 -1
View File
@@ -32,8 +32,11 @@
#include <bsp.h>
void bsp_reset(void)
void bsp_reset( rtems_fatal_source source, rtems_fatal_code code )
{
(void) source;
(void) code;
zynqmp_debug_console_flush();
while (true) {
+2 -2
View File
@@ -100,6 +100,7 @@
#include <stdbool.h>
#include <bsp.h>
#include <bsp/bootcard.h>
/*
* Number of debug registers.
@@ -109,7 +110,6 @@
/*
* Prototypes we need to avoid warnings but not going into public space.
*/
void bsp_reset(void);
void breakpoint (void);
void set_debug_traps(void);
void set_mem_err(void);
@@ -1103,7 +1103,7 @@ handle_exception (int exceptionVector)
/* kill the program */
case 'k': /* do nothing */
bsp_reset();
bsp_reset(RTEMS_FATAL_SOURCE_BSP, 0);
continue;
default:
+1 -1
View File
@@ -160,7 +160,7 @@ _IBMPC_scankey(char *outChar)
case 0x53:
if (ctrl_pressed && alt_pressed)
bsp_reset(); /* ctrl+alt+del -> reboot */
bsp_reset( RTEMS_FATAL_SOURCE_BSP, 0 ); /* ctrl+alt+del -> reboot */
break;
/*
+6 -1
View File
@@ -128,11 +128,16 @@ static void_fn do_null, enter, show_ptregs, send_intr, lastcons, caps_toggle,
num, hold, scroll_forw, scroll_back, caps_on, compose,
SAK, decr_console, incr_console, spawn_console, bare_num;
static void bsp_reset_wrapper(void)
{
bsp_reset(RTEMS_FATAL_SOURCE_BSP, 0);
}
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,
bsp_reset, caps_on, compose, SAK,
bsp_reset_wrapper, caps_on, compose, SAK,
decr_console, incr_console, spawn_console, bare_num
};
+7 -3
View File
@@ -26,12 +26,16 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <rtems.h>
#include <bsp.h>
#include <bsp/bootcard.h>
void bsp_reset(void)
#include <bsp.h>
void bsp_reset( rtems_fatal_source source, rtems_fatal_code code )
{
(void) source;
(void) code;
/* shutdown and reboot */
outport_byte(0x64, 0xFE); /* use keyboard controller */
RTEMS_UNREACHABLE();
}
+1 -1
View File
@@ -62,7 +62,7 @@ extern const char *bsp_boot_cmdline;
void bsp_start(void);
void bsp_reset(void);
RTEMS_NO_RETURN void bsp_reset(rtems_fatal_source source, rtems_fatal_code code);
/**
* @brief Standard system initialization procedure.
+4 -6
View File
@@ -48,14 +48,12 @@ static void reconf(void)
icap_write(0, 0xffff); /* dummy word */
}
void bsp_fatal_extension(
rtems_fatal_source source,
bool always_set_to_false,
rtems_fatal_code error
)
void bsp_reset( rtems_fatal_source source, rtems_fatal_code code )
{
if (source == RTEMS_FATAL_SOURCE_EXIT && error)
if (source == RTEMS_FATAL_SOURCE_EXIT && code)
reconf();
else
reboot();
RTEMS_UNREACHABLE();
}
+6 -2
View File
@@ -32,11 +32,13 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <bsp.h>
#include <bsp/bootcard.h>
void bsp_reset( void )
void bsp_reset( rtems_fatal_source source, rtems_fatal_code code )
{
(void) source;
(void) code;
/*
* If on the GDB simulator, trap to it and exit.
*/
@@ -44,4 +46,6 @@ void bsp_reset( void )
__asm__ volatile ( "mvi r8, 1" ); /* 1 is SYS_exit */
__asm__ volatile ( "scall" );
#endif
RTEMS_UNREACHABLE();
}
+5 -5
View File
@@ -54,15 +54,15 @@ static rtems_isr bsp_return_to_monitor_trap(
__asm__ volatile ( "jmp %0@" : "=a" (start_addr) : "0" (start_addr) );
}
void bsp_fatal_extension(
rtems_fatal_source source,
bool always_set_to_false,
rtems_fatal_code error
)
void bsp_reset( rtems_fatal_source source, rtems_fatal_code code )
{
(void) source;
(void) code;
pcc->timer1_int_control = 0; /* Disable Timer 1 */
pcc->timer2_int_control = 0; /* Disable Timer 2 */
M68Kvec[ 45 ] = bsp_return_to_monitor_trap; /* install handler */
__asm__ volatile( "trap #13" ); /* ensures SUPV mode */
RTEMS_UNREACHABLE();
}
+5 -5
View File
@@ -36,12 +36,12 @@ static rtems_isr bsp_return_to_monitor_trap(
__asm__ volatile( ".short 0x63" ); /* return to 162Bug (.RETURN) */
}
void bsp_fatal_extension(
rtems_fatal_source source,
bool always_set_to_false,
rtems_fatal_code error
)
void bsp_reset( rtems_fatal_source source, rtems_fatal_code code )
{
(void) source;
(void) code;
M68Kvec[ 45 ] = bsp_return_to_monitor_trap; /* install handler */
__asm__ volatile( "trap #13" ); /* ensures SUPV mode */
RTEMS_UNREACHABLE();
}
+5 -5
View File
@@ -59,12 +59,12 @@ static void bsp_return_to_monitor_trap( void )
* 167Bug because trap 13 is documented as being reserved for the internal
* use of the debugger.
*/
void bsp_fatal_extension(
rtems_fatal_source source,
bool always_set_to_false,
rtems_fatal_code error
)
void bsp_reset( rtems_fatal_source source, rtems_fatal_code code )
{
(void) source;
(void) code;
M68Kvec[ 45 ] = bsp_return_to_monitor_trap;
__asm__ volatile( "trap #13" );
RTEMS_UNREACHABLE();
}
-26
View File
@@ -1,26 +0,0 @@
/*
* This routine returns control from RTEMS to the monitor.
*/
/*
* Copyright (c) 2005 Eric Norum <eric@norum.ca>
*
* COPYRIGHT (c) 2005.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.org/license/LICENSE.
*/
#include <bsp.h>
#include <bsp/bootcard.h>
void bsp_fatal_extension(
rtems_fatal_source source,
bool always_set_to_false,
rtems_fatal_code error
)
{
bsp_reset();
}
+5 -1
View File
@@ -30,7 +30,11 @@
#include <bsp.h>
#include <bsp/bootcard.h>
void bsp_reset(void)
void bsp_reset( rtems_fatal_source source, rtems_fatal_code code )
{
(void) source;
(void) code;
bsp_sysReset(0);
RTEMS_UNREACHABLE();
}
@@ -33,12 +33,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 )
{
(void) source;
(void) code;
__asm__ volatile (
"brai 0xFFFFFFFFFFFFFFFF"
);
RTEMS_UNREACHABLE();
}
+5 -2
View File
@@ -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();
}
+5 -2
View File
@@ -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();
}
-1
View File
@@ -251,7 +251,6 @@ extern char *BSP_commandline_string;
#define BSP_Convert_decrementer( _value ) \
((unsigned long long) ((((unsigned long long)BSP_time_base_divisor) * 1000000ULL) /((unsigned long long) BSP_bus_frequency)) * ((unsigned long long) (_value)))
extern void bsp_reset(void);
extern int BSP_disconnect_clock_handler (void);
extern int BSP_connect_clock_handler (void);
+4 -6
View File
@@ -3,16 +3,14 @@
#include <bsp/bootcard.h>
#include <rtems/bspIo.h>
#include <libcpu/io.h>
#include <libcpu/stackTrace.h>
#include <stdint.h>
void bsp_reset()
void bsp_reset( rtems_fatal_source source, rtems_fatal_code code )
{
(void) source;
(void) code;
printk("Printing a stack trace for your convenience :-)\n");
CPU_print_stack();
printk("RTEMS terminated; Rebooting ...\n");
/* Mvme5500 board reset : 2004 S. Kate Feng <feng1@bnl.gov> */
out_8((volatile uint8_t*) (BSP_MV64x60_DEV1_BASE +2), 0x80);
RTEMS_UNREACHABLE();
}
+4 -1
View File
@@ -31,8 +31,11 @@
#include <bsp/mpc5200.h>
#include <bsp/bootcard.h>
void bsp_reset( void )
void bsp_reset( rtems_fatal_source source, rtems_fatal_code code )
{
(void) source;
(void) code;
#if (BENCHMARK_IRQ_PROCESSING == 1)
{
BSP_IRQ_Benchmarking_Report();
+5 -2
View File
@@ -24,12 +24,15 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <bsp.h>
#include <bsp/bootcard.h>
#include <mpc83xx/mpc83xx.h>
void bsp_reset(void)
void bsp_reset( rtems_fatal_source source, rtems_fatal_code code )
{
(void) source;
(void) code;
mpc83xx_reset();
RTEMS_UNREACHABLE();
}
@@ -10,8 +10,12 @@
| Arguments: None.
| Returns: Nothing.
+--------------------------------------------------------------------------*/
void bsp_reset(void)
void bsp_reset( rtems_fatal_source source, rtems_fatal_code code )
{
(void) source;
(void) code;
printk("Printing a stack trace for your convenience :-)\n");
CPU_print_stack();
/* shutdown and reboot */
@@ -25,4 +29,5 @@ void bsp_reset(void)
outb(1, 0x92);
#endif
RTEMS_UNREACHABLE();
} /* bsp_reset */
+4 -1
View File
@@ -39,8 +39,11 @@
#include <mpc55xx/regs.h>
void bsp_reset(void)
void bsp_reset( rtems_fatal_source source, rtems_fatal_code code )
{
(void) source;
(void) code;
while (true) {
#if MPC55XX_CHIP_FAMILY == 564
/* TODO */
+7 -2
View File
@@ -49,10 +49,14 @@
#include <bsp.h>
#include <bsp/bootcard.h>
void
bsp_reset(void)
void bsp_reset( rtems_fatal_source source, rtems_fatal_code code )
{
uint8_t v;
(void) source;
(void) code;
/*
* AFAIK, the hardest reset available; cleared
* some errors a VME-bus reset wouldn't (hung
@@ -62,6 +66,7 @@ uint8_t v;
v &= ~BSP_MVME3100_SYS_CR_RESET_MSK;
v |= BSP_MVME3100_SYS_CR_RESET;
out_8( BSP_MVME3100_SYS_CR, v );
RTEMS_UNREACHABLE();
}
uint8_t
-1
View File
@@ -154,7 +154,6 @@ extern unsigned int BSP_time_base_divisor;
#define BSP_Convert_decrementer( _value ) \
((unsigned long long) ((((unsigned long long)BSP_time_base_divisor) * 1000000ULL) /((unsigned long long) BSP_bus_frequency)) * ((unsigned long long) (_value)))
extern void bsp_reset(void);
/* extern int printk(const char *, ...) __attribute__((format(printf, 1, 2))); */
extern int BSP_disconnect_clock_handler(void);
extern int BSP_connect_clock_handler(void);
+4 -6
View File
@@ -7,16 +7,14 @@
#include <bsp/bootcard.h>
#include <rtems/bspIo.h>
#include <libcpu/io.h>
#include <libcpu/stackTrace.h>
#include <stdint.h>
void bsp_reset()
void bsp_reset( rtems_fatal_source source, rtems_fatal_code code )
{
(void) source;
(void) code;
printk("Printing a stack trace for your convenience :-)\n");
CPU_print_stack();
printk("RTEMS terminated; Rebooting ...\n");
/* Mvme5500 board reset : 2004 S. Kate Feng <feng1@bnl.gov> */
out_8((volatile uint8_t*) (GT64x60_DEV1_BASE +2), 0x80);
RTEMS_UNREACHABLE();
}
@@ -215,7 +215,7 @@ int quiet=0;
rtems_task_suspend(id);
} else {
printk("PANIC, rebooting...\n");
bsp_reset();
bsp_reset(RTEMS_FATAL_SOURCE_BSP, 0);
}
}
}
+4 -1
View File
@@ -44,11 +44,14 @@ static int find_rstcr_node(const void *fdt, int node)
return fdt_node_offset_by_prop_value(fdt, node, "fsl,has-rstcr", NULL, 0);
}
void bsp_reset(void)
void bsp_reset( rtems_fatal_source source, rtems_fatal_code code )
{
rtems_interrupt_level level;
const char *fdt;
(void) source;
(void) code;
rtems_interrupt_local_disable(level);
(void) level;
-37
View File
@@ -1,37 +0,0 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/*
* Copyright (c) 2012 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <stdbool.h>
#include <bsp/bootcard.h>
void bsp_reset(void)
{
while (true) {
/* Do nothing */
}
}
+1 -1
View File
@@ -220,6 +220,6 @@ void bsp_fatal_extension(
* you must have meant to reset the board.
*/
#if (BSP_PRESS_KEY_FOR_RESET) || (BSP_RESET_BOARD_AT_EXIT)
bsp_reset();
bsp_reset( source, code );
#endif
}
+4 -1
View File
@@ -37,9 +37,11 @@
#include <bsp.h>
#include <bsp/bootcard.h>
void bsp_reset(void)
void bsp_reset( rtems_fatal_source source, rtems_fatal_code code )
{
uint32_t PSCI_FN_SYSTEM_RESET = 0x84000009;
(void) source;
(void) code;
__asm__ volatile(
#if defined(AARCH64_MULTILIB_ARCH_V8) || defined(AARCH64_MULTILIB_ARCH_V8_ILP32)
"mov x0, %0\n"
@@ -53,4 +55,5 @@ void bsp_reset(void)
#endif
: : "r" (PSCI_FN_SYSTEM_RESET)
);
RTEMS_UNREACHABLE();
}
-36
View File
@@ -1,36 +0,0 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/*
* This is a dummy bsp_reset routine.
*
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <rtems.h>
#include <bsp/bootcard.h>
void bsp_reset( void )
{
}

Some files were not shown because too many files have changed in this diff Show More