- Added a function to perform an iret to the current code location (e.g., to

re-enable NMIs).
This commit is contained in:
Jan Stoess 2007-12-07 19:28:45 +01:00
parent 296f0aa9b3
commit a59178f0b2
1 changed files with 20 additions and 0 deletions

View File

@ -93,6 +93,25 @@
#define CPUID_APM_HAS_VID (1 << 2) /* voltage id control */
#define CPUID_APM_HAS_TT (1 << 3) /* thermal trip */
INLINE void x86_iret_self()
{
__asm__ __volatile__(
"push %[kds] \n\t"
"push %%rsp \n\t"
"pushf \n\t"
"push %[kcs] \n\t"
"pushq $1f \n\t"
"iretq \n\t"
"1: \n\t"
"add $8, %%rsp \n\t"
: /* No output */
: [kds] "r" ((word_t) X86_KDS),
[kcs] "r" ((word_t) X86_KCS)
: "memory"
);
}
typedef union {
u32_t raw[2];
@ -140,6 +159,7 @@ typedef union {
} amd64_cache_info_t;
class amd64_cpu_features_t{
private: