diff options
Diffstat (limited to 'sys/arch/i386/include/cpufunc.h')
-rw-r--r-- | sys/arch/i386/include/cpufunc.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sys/arch/i386/include/cpufunc.h b/sys/arch/i386/include/cpufunc.h index 6a35e8deb1f..83147d4f268 100644 --- a/sys/arch/i386/include/cpufunc.h +++ b/sys/arch/i386/include/cpufunc.h @@ -50,6 +50,12 @@ static __inline int bdb(void) return (1); } +static __inline void +invlpg(u_int addr) +{ + __asm __volatile("invlpg (%0)" : : "r" (addr) : "memory"); +} + static __inline void lidt(void *p) { @@ -105,6 +111,20 @@ rcr3(void) } static __inline void +lcr4(u_int val) +{ + __asm __volatile("movl %0,%%cr4" : : "r" (val)); +} + +static __inline u_int +rcr4(void) +{ + u_int val; + __asm __volatile("movl %%cr4,%0" : "=r" (val)); + return val; +} + +static __inline void tlbflush(void) { u_int val; |