2012-07-02 21:47:06 +04:00
|
|
|
/*
|
|
|
|
* Copyright 2012, Alex Smith, alex@alex-smith.me.uk.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
|
|
|
#ifndef _KERNEL_ARCH_X86_64_IFRAME_H
|
|
|
|
#define _KERNEL_ARCH_X86_64_IFRAME_H
|
|
|
|
|
|
|
|
|
|
|
|
struct iframe {
|
|
|
|
uint64 type;
|
2014-09-10 22:48:35 +04:00
|
|
|
void* fpu;
|
2012-07-02 21:47:06 +04:00
|
|
|
uint64 r15;
|
|
|
|
uint64 r14;
|
|
|
|
uint64 r13;
|
|
|
|
uint64 r12;
|
|
|
|
uint64 r11;
|
|
|
|
uint64 r10;
|
|
|
|
uint64 r9;
|
|
|
|
uint64 r8;
|
2012-07-09 19:43:01 +04:00
|
|
|
uint64 bp;
|
|
|
|
uint64 si;
|
|
|
|
uint64 di;
|
|
|
|
uint64 dx;
|
|
|
|
uint64 cx;
|
|
|
|
uint64 bx;
|
|
|
|
uint64 ax;
|
2012-08-05 17:20:37 +04:00
|
|
|
uint64 orig_rax;
|
2012-07-02 21:47:06 +04:00
|
|
|
uint64 vector;
|
|
|
|
uint64 error_code;
|
2012-07-09 19:43:01 +04:00
|
|
|
uint64 ip;
|
2012-07-02 21:47:06 +04:00
|
|
|
uint64 cs;
|
|
|
|
uint64 flags;
|
|
|
|
|
2012-07-13 17:09:09 +04:00
|
|
|
// SP and SS are unconditionally present on x86_64, make both names
|
|
|
|
// available.
|
|
|
|
union {
|
|
|
|
uint64 sp;
|
|
|
|
uint64 user_sp;
|
|
|
|
};
|
|
|
|
union {
|
|
|
|
uint64 ss;
|
|
|
|
uint64 user_ss;
|
|
|
|
};
|
2012-07-02 21:47:06 +04:00
|
|
|
} _PACKED;
|
|
|
|
|
|
|
|
#define IFRAME_IS_USER(f) (((f)->cs & DPL_USER) == DPL_USER)
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* _KERNEL_ARCH_X86_64_IFRAME_H */
|