diff options
Diffstat (limited to 'sys/i386/include/cpufunc.h')
-rw-r--r-- | sys/i386/include/cpufunc.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sys/i386/include/cpufunc.h b/sys/i386/include/cpufunc.h index 65cc855793f02..16bb63b86a174 100644 --- a/sys/i386/include/cpufunc.h +++ b/sys/i386/include/cpufunc.h @@ -2,7 +2,7 @@ * Functions to provide access to special i386 instructions. * XXX - bezillions more are defined in locore.s but are not declared anywhere. * - * $Id: cpufunc.h,v 1.9 1994/01/31 23:48:23 davidg Exp $ + * $Id: cpufunc.h,v 1.11 1994/06/01 03:09:51 davidg Exp $ */ #ifndef _MACHINE_CPUFUNC_H_ @@ -11,6 +11,8 @@ #include <sys/cdefs.h> #include <sys/types.h> +#include "machine/spl.h" + #ifdef __GNUC__ static inline int bdb(void) @@ -69,6 +71,14 @@ tlbflush() __asm __volatile("movl %%cr3, %%eax; movl %%eax, %%cr3" : : : "ax"); } +static inline u_long +rcr2() +{ + u_long data; + __asm __volatile("movl %%cr2,%%eax" : "=a" (data)); + return data; +} + static inline int imin(a, b) @@ -224,7 +234,6 @@ void load_cr0 __P((u_int cr0)); u_int rcr0 __P((void)); void load_cr3(u_long); u_long rcr3(void); -u_long rcr2(void); void setidt __P((int, void (*)(), int, int)); extern u_long kvtop(void *); |