diff options
author | jhb <jhb@FreeBSD.org> | 2009-06-16 15:13:18 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2009-06-16 15:13:18 +0000 |
commit | 04e0bdb73d5d5ed7a8fe2836b11aa09f4ce77667 (patch) | |
tree | 8dbc08498b32625de83a4f9dcb0485f57bb40132 /sys/i386 | |
parent | c971ea42f7b588ce3fb409b0b5f9e4a45e5a2e71 (diff) | |
download | FreeBSD-src-04e0bdb73d5d5ed7a8fe2836b11aa09f4ce77667.zip FreeBSD-src-04e0bdb73d5d5ed7a8fe2836b11aa09f4ce77667.tar.gz |
Move (read|write)_cyrix_reg() inlines from specialreg.h to cpufunc.h.
specialreg.h now consists solely of register-related macros.
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/include/cpufunc.h | 16 | ||||
-rw-r--r-- | sys/i386/include/specialreg.h | 16 |
2 files changed, 16 insertions, 16 deletions
diff --git a/sys/i386/include/cpufunc.h b/sys/i386/include/cpufunc.h index 410437d..6139a1f 100644 --- a/sys/i386/include/cpufunc.h +++ b/sys/i386/include/cpufunc.h @@ -620,6 +620,20 @@ load_dr7(u_int dr7) __asm __volatile("movl %0,%%dr7" : : "r" (dr7)); } +static __inline u_char +read_cyrix_reg(u_char reg) +{ + outb(0x22, reg); + return inb(0x23); +} + +static __inline void +write_cyrix_reg(u_char reg, u_char data) +{ + outb(0x22, reg); + outb(0x23, data); +} + static __inline register_t intr_disable(void) { @@ -702,6 +716,7 @@ u_int rdr5(void); u_int rdr6(void); u_int rdr7(void); uint64_t rdtsc(void); +u_char read_cyrix_reg(u_char reg); u_int read_eflags(void); u_int rfs(void); uint64_t rgdt(void); @@ -710,6 +725,7 @@ uint64_t ridt(void); u_short rldt(void); u_short rtr(void); void wbinvd(void); +void write_cyrix_reg(u_char reg, u_char data); void write_eflags(u_int ef); void wrmsr(u_int msr, uint64_t newval); diff --git a/sys/i386/include/specialreg.h b/sys/i386/include/specialreg.h index 67283e4..aeda4c4 100644 --- a/sys/i386/include/specialreg.h +++ b/sys/i386/include/specialreg.h @@ -575,20 +575,4 @@ #define VIA_CRYPT_CWLO_KEY192 0x0000040c /* 192bit, 12 rds */ #define VIA_CRYPT_CWLO_KEY256 0x0000080e /* 256bit, 15 rds */ -#ifndef LOCORE -static __inline u_char -read_cyrix_reg(u_char reg) -{ - outb(0x22, reg); - return inb(0x23); -} - -static __inline void -write_cyrix_reg(u_char reg, u_char data) -{ - outb(0x22, reg); - outb(0x23, data); -} -#endif - #endif /* !_MACHINE_SPECIALREG_H_ */ |