mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-08-29 14:40:55 +08:00
nios2: Use NIOS2_CTLREG_INDEX_STATUS
This commit is contained in:
committed by
Sebastian Huber
parent
8b94c03fdc
commit
0986294f89
@@ -12,11 +12,12 @@
|
||||
*/
|
||||
|
||||
#include <rtems/score/cpu.h>
|
||||
#include <rtems/score/nios2-utility.h>
|
||||
|
||||
void _CPU_Fatal_halt( uint32_t _error )
|
||||
{
|
||||
/* write 0 to status register (disable interrupts) */
|
||||
__builtin_wrctl( 0, 0 );
|
||||
__builtin_wrctl( NIOS2_CTLREG_INDEX_STATUS, 0 );
|
||||
|
||||
/* write error code to ET register */
|
||||
__asm__ volatile ("mov et, %z0" : : "rM" (_error));
|
||||
|
||||
Reference in New Issue
Block a user