[PATCH 4/5] SPARC: Fatal_halt use source and exit codes

Sebastian Huber sebastian.huber at embedded-brains.de
Wed Jun 4 09:50:00 UTC 2014


On 2014-06-04 11:23, Daniel Hellstrom wrote:
> diff --git a/cpukit/score/cpu/sparc/rtems/score/cpu.h b/cpukit/score/cpu/sparc/rtems/score/cpu.h
> index ce5ea60..b625bb9 100644
> --- a/cpukit/score/cpu/sparc/rtems/score/cpu.h
> +++ b/cpukit/score/cpu/sparc/rtems/score/cpu.h
> @@ -1075,19 +1075,15 @@ void _CPU_Context_Initialize(
>
>   /* Fatal Error manager macros */
>
> +extern void BSP_Fatal_halt(uint32_t source, uint32_t error)
> +  RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
> +
>   /**
>    * This routine copies _error into a known place -- typically a stack
>    * location or a register, optionally disables interrupts, and
>    * halts/stops the CPU.
>    */
> -#define _CPU_Fatal_halt( _source, _error ) \
> -  do { \
> -    uint32_t   level; \
> -    \
> -    level = sparc_disable_interrupts(); \
> -    __asm__ volatile ( "mov  %0, %%g1 " : "=r" (level) : "0" (level) ); \
> -    while (1); /* loop forever */ \
> -  } while (0)
> +#define _CPU_Fatal_halt( _source, _error ) BSP_Fatal_halt( _source, _error )

I would name it _BSP_Fatal_halt(), similar to _BSP_Exception_frame_print().

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the devel mailing list