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

Daniel Hellstrom daniel at gaisler.com
Wed Jun 4 18:41:21 UTC 2014


On 06/04/2014 11:50 AM, Sebastian Huber wrote:
> 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().

Ok, I will update this. Seems to be different naming between the 
architectures. Thanks for you fast response!

Daniel




More information about the devel mailing list