Xen Test Framework
|
Macros for creating constants using mnemonics. More...
Go to the source code of this file.
Macros | |
#define | TOK_OR(t, ...) VAR_MACRO_C1(TOK_OR, t, ##__VA_ARGS__) |
Tokenise and OR together. More... | |
#define | INIT_GDTE_SYM(base, limit, ...) INIT_GDTE(base, limit, TOK_OR(SEG_ATTR_, ##__VA_ARGS__)) |
Initialiser for an LDT/GDT entry using SEG_ATTR_ mnemonics. More... | |
#define | GDTE_SYM(base, limit, ...) ((user_desc)INIT_GDTE_SYM(base, limit, __VA_ARGS__)) |
As INIT_GDTE_SYM(), but creates a user_desc object. More... | |
#define | SEL_EC_SYM(sel, ...) (sel | TOK_OR(X86_EC_, ##__VA_ARGS__)) |
Create a selector based error code using X86_EC_ mnemonics. More... | |
#define | EXC_EC_SYM(exc, ...) SEL_EC_SYM(((X86_EXC_ ## exc) << 3), IDT, ##__VA_ARGS__) |
Create an exception selector based error code using mnemonics, with implicit X86_EC_IDT. More... | |
#define | PF_SYM(...) TOK_OR(_PAGE_, ##__VA_ARGS__) |
Create pagetable entry flags based on mnemonics. More... | |
#define | PFEC_SYM(...) TOK_OR(X86_PFEC_, ##__VA_ARGS__) |
Create pagetable error code based on mnemonics. More... | |
Macros for creating constants using mnemonics.
Definition in file symbolic-const.h.
#define TOK_OR | ( | t, | |
... | |||
) | VAR_MACRO_C1(TOK_OR, t, ##__VA_ARGS__) |
Tokenise and OR together.
For each varadic parameter, tokenise with 't' and OR together.
t | Common stem partial token. |
... | Partial tokens. |
Example:
TOK_OR(t, x, y) => (t ## x | t ## y) TOK_OR(t, x, y, z) => (t ## x | t ## y | t ## z)
Definition at line 42 of file symbolic-const.h.
Initialiser for an LDT/GDT entry using SEG_ATTR_ mnemonics.
base | Segment base. |
limit | Segment limit. |
... | Partial SEG_ATTR_ tokens for attributes. |
Example usage:
Definition at line 58 of file symbolic-const.h.
#define GDTE_SYM | ( | base, | |
limit, | |||
... | |||
) | ((user_desc)INIT_GDTE_SYM(base, limit, __VA_ARGS__)) |
As INIT_GDTE_SYM(), but creates a user_desc object.
Definition at line 64 of file symbolic-const.h.
#define SEL_EC_SYM | ( | sel, | |
... | |||
) | (sel | TOK_OR(X86_EC_, ##__VA_ARGS__)) |
Create a selector based error code using X86_EC_ mnemonics.
sel | Selector value. |
... | Partial X86_EC_ tokens. |
Example usage:
Definition at line 80 of file symbolic-const.h.
#define EXC_EC_SYM | ( | exc, | |
... | |||
) | SEL_EC_SYM(((X86_EXC_ ## exc) << 3), IDT, ##__VA_ARGS__) |
Create an exception selector based error code using mnemonics, with implicit X86_EC_IDT.
exc | Partial X86_EXC_ token for selector. |
... | Partial X86_EC_ tokens. |
Example usage:
Definition at line 96 of file symbolic-const.h.
#define PF_SYM | ( | ... | ) | TOK_OR(_PAGE_, ##__VA_ARGS__) |
Create pagetable entry flags based on mnemonics.
... | Partial PAGE tokens. |
Example usage:
Definition at line 108 of file symbolic-const.h.
#define PFEC_SYM | ( | ... | ) | TOK_OR(X86_PFEC_, ##__VA_ARGS__) |
Create pagetable error code based on mnemonics.
... | Partial X86_PFEC_ tokens. |
Eample usage:
Definition at line 119 of file symbolic-const.h.