1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-20 11:11:24 +00:00

Move (read|write)_cyrix_reg() inlines from specialreg.h to cpufunc.h.

specialreg.h now consists solely of register-related macros.
This commit is contained in:
John Baldwin 2009-06-16 15:13:18 +00:00
parent 706b8a103a
commit 38a9df71f9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=194295
2 changed files with 16 additions and 16 deletions

View File

@ -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);

View File

@ -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_ */