diff options
author | chuck <chuck@cvs.openbsd.org> | 1997-09-04 22:40:45 +0000 |
---|---|---|
committer | chuck <chuck@cvs.openbsd.org> | 1997-09-04 22:40:45 +0000 |
commit | 05bf96a8a6f2ec1c0919334b8ef83ea79ff51082 (patch) | |
tree | d6906c6ff61038580658442c1ecb7099435e9a85 /sys/arch/i386/include/cpufunc.h | |
parent | 2675137d9d32f9cf9c9fc42578f38ed22d59186e (diff) |
add invlpg and %cr4 read/write
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; |