- 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:24 +01:00
parent 8199813781
commit 862df7e18e
1 changed files with 14 additions and 0 deletions

View File

@ -32,6 +32,20 @@
#ifndef __ARCH__X86__X32__CPU_H__
#define __ARCH__X86__X32__CPU_H__
INLINE void x86_iret_self()
{
__asm__ __volatile__(
"pushf \n\t"
"push %[kcs] \n\t"
"pushl $1f \n\t"
"iret \n\t"
"1: \n\t"
: /* No ooutput */
: [kds] "r" ((word_t) X86_KDS),
[kcs] "r" ((word_t) X86_KCS)
);
}
INLINE bool ia32_has_cpuid()
{