Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


Merge branch 'devel'
[palacios.git] / kitten / include / arch-x86_64 / bug.h
1 #ifndef __ARCH_BUG_H
2 #define __ARCH_BUG_H
3
4 #include <lwk/stringify.h>
5
6 /*
7  * Tell the user there is some problem.  The exception handler decodes 
8  * this frame.
9  */
10 struct bug_frame {
11         unsigned char ud2[2];
12         unsigned char push;
13         signed int filename;
14         unsigned char ret;
15         unsigned short line;
16 } __attribute__((packed));
17
18 #define HAVE_ARCH_BUG
19 /* We turn the bug frame into valid instructions to not confuse
20    the disassembler. Thanks to Jan Beulich & Suresh Siddha
21    for nice instruction selection.
22    The magic numbers generate mov $64bitimm,%eax ; ret $offset. */
23 #define BUG()                                                           \
24         asm volatile(                                                   \
25         "ud2 ; pushq $%c1 ; ret $%c0" ::                                \
26                      "i"(__LINE__), "i" (__FILE__))
27 void out_of_line_bug(void);
28
29 #include <arch-generic/bug.h>
30 #endif