summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKATO Takenori <kato@FreeBSD.org>1998-01-25 17:02:00 +0000
committerKATO Takenori <kato@FreeBSD.org>1998-01-25 17:02:00 +0000
commit31e6b13443b95c3b43183e106057be814d406780 (patch)
tree7b4d4b4b4d49db3d0d1e1268db687bf37823360a
parent2f5a8c876ad8de7e2322937c217f25b60cec0bc5 (diff)
Notes
-rw-r--r--sys/amd64/include/cpufunc.h11
-rw-r--r--sys/i386/include/cpufunc.h11
2 files changed, 20 insertions, 2 deletions
diff --git a/sys/amd64/include/cpufunc.h b/sys/amd64/include/cpufunc.h
index 8806ef31ee72..0aa8e74d7f65 100644
--- a/sys/amd64/include/cpufunc.h
+++ b/sys/amd64/include/cpufunc.h
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: cpufunc.h,v 1.73 1997/12/14 02:11:23 dyson Exp $
+ * $Id: cpufunc.h,v 1.74 1998/01/15 07:32:55 gibbs Exp $
*/
/*
@@ -58,6 +58,14 @@ breakpoint(void)
}
static __inline void
+cpuid(u_int *eax, u_int *ebx, u_int *ecx, u_int *edx)
+{
+ __asm __volatile(".byte 0x0f, 0xa2"
+ : "=a" (*eax), "=b" (*ebx), "=c" (*ecx), "=d" (*edx)
+ : "a" (*eax));
+}
+
+static __inline void
disable_intr(void)
{
__asm __volatile("cli" : : : "memory");
@@ -395,6 +403,7 @@ wrmsr(u_int msr, quad_t newval)
#else /* !__GNUC__ */
int breakpoint __P((void));
+void cpuid __P((u_int *eax, u_int *ebx, u_int *ecx, u_int *edx));
void disable_intr __P((void));
void enable_intr __P((void));
u_char inb __P((u_int port));
diff --git a/sys/i386/include/cpufunc.h b/sys/i386/include/cpufunc.h
index 8806ef31ee72..0aa8e74d7f65 100644
--- a/sys/i386/include/cpufunc.h
+++ b/sys/i386/include/cpufunc.h
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: cpufunc.h,v 1.73 1997/12/14 02:11:23 dyson Exp $
+ * $Id: cpufunc.h,v 1.74 1998/01/15 07:32:55 gibbs Exp $
*/
/*
@@ -58,6 +58,14 @@ breakpoint(void)
}
static __inline void
+cpuid(u_int *eax, u_int *ebx, u_int *ecx, u_int *edx)
+{
+ __asm __volatile(".byte 0x0f, 0xa2"
+ : "=a" (*eax), "=b" (*ebx), "=c" (*ecx), "=d" (*edx)
+ : "a" (*eax));
+}
+
+static __inline void
disable_intr(void)
{
__asm __volatile("cli" : : : "memory");
@@ -395,6 +403,7 @@ wrmsr(u_int msr, quad_t newval)
#else /* !__GNUC__ */
int breakpoint __P((void));
+void cpuid __P((u_int *eax, u_int *ebx, u_int *ecx, u_int *edx));
void disable_intr __P((void));
void enable_intr __P((void));
u_char inb __P((u_int port));