Xen Test Framework
exinfo.h
Go to the documentation of this file.
1
6#ifndef XTF_X86_EXINFO_H
7#define XTF_X86_EXINFO_H
8
9#include <arch/processor.h>
10
19typedef unsigned int exinfo_t;
20
21#define EXINFO_EXPECTED (1u << 31)
22
23#define EXINFO_AVAIL1 (1u << 25)
24#define EXINFO_AVAIL0 (1u << 24)
25
26#define EXINFO(vec, ec) (EXINFO_EXPECTED | \
27 (((vec) & 0xff) << 16) | ((ec) & 0xffff))
28
29#define EXINFO_SYM(exc, ec) EXINFO(X86_EXC_ ## exc, ec)
30
31static inline unsigned int exinfo_vec(exinfo_t info)
32{
33 return (info >> 16) & 0xff;
34}
35
36static inline unsigned int exinfo_ec(exinfo_t info)
37{
38 return info & 0xffff;
39}
40
41#endif /* XTF_X86_EXINFO_H */
42
43/*
44 * Local variables:
45 * mode: C
46 * c-file-style: "BSD"
47 * c-basic-offset: 4
48 * tab-width: 4
49 * indent-tabs-mode: nil
50 * End:
51 */
static unsigned int exinfo_vec(exinfo_t info)
Definition: exinfo.h:31
unsigned int exinfo_t
Packed exception and error code information.
Definition: exinfo.h:19
static unsigned int exinfo_ec(exinfo_t info)
Definition: exinfo.h:36