summaryrefslogtreecommitdiffstats
path: root/bsps/i386/pc386/start/bsp_fatal_halt.c
blob: 954955dee10b2ef714882285c384781e0697651a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/**
 *  COPYRIGHT (c) 2016.
 *  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 <rtems/score/cpuimpl.h>

void _CPU_Fatal_halt( uint32_t source, CPU_Uint32ptr error )
{
  __asm__ volatile (
         "cli\n\t"
	 "movl %0,%%eax\n\t"
	 "hlt\n\t"
         : "=r" ((error))
         : "0" ((error))
  );
  RTEMS_UNREACHABLE();
}