summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/i386/pc386/startup/bsp_fatal_halt.c
blob: c9830f6bac579739efc76f6d18941e13849dddcc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/**
 *  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 <bsp.h>

void _CPU_Fatal_halt(uint32_t source, uint32_t error)
{
  uint32_t _error_lvalue = ( _error );
  __asm__ volatile (
         "cli ; movl %0,%%eax ; hlt"
         : "=r" ((_error_lvalue))
         : "0" ((_error_lvalue))
  );
}