From 07d96453a98c9df64be87eaf1f9023ba05e90297 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 21 Nov 2017 12:00:49 +0100 Subject: powerpc: Remove _BSP_Fatal_error() BSPs can use the bsp_fatal_extension() to provide BSP-specific fatal error handling. There is no need for a _BSP_Fatal_error(). Close #3246. --- cpukit/score/cpu/powerpc/rtems/score/cpu.h | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'cpukit/score/cpu') diff --git a/cpukit/score/cpu/powerpc/rtems/score/cpu.h b/cpukit/score/cpu/powerpc/rtems/score/cpu.h index b8f00bf910..8c0f200641 100644 --- a/cpukit/score/cpu/powerpc/rtems/score/cpu.h +++ b/cpukit/score/cpu/powerpc/rtems/score/cpu.h @@ -675,22 +675,21 @@ static inline void _CPU_ISR_Set_level( uint32_t level ) _CPU_MSR_SET(msr); } -/* Fatal Error manager macros */ - -/* - * This routine copies _error into a known place -- typically a stack - * location or a register, optionally disables interrupts, and - * halts/stops the CPU. - */ - -void _BSP_Fatal_error(unsigned int); - #endif /* ASM */ #define _CPU_Fatal_halt( _source, _error ) \ - _BSP_Fatal_error(_error) - -/* end of Fatal Error manager macros */ + do { \ + ppc_interrupt_disable(); \ + __asm__ volatile ( \ + "mr 3, %0\n" \ + "mr 4, %1\n" \ + "1:\n" \ + "b 1b\n" \ + : \ + : "r" (_source), "r" (_error) \ + : "memory" \ + ); \ + } while ( 0 ) /* * Should be large enough to run all RTEMS tests. This ensures -- cgit v1.2.3