summaryrefslogtreecommitdiff
path: root/sys/arch/i386/include
diff options
context:
space:
mode:
authordm <dm@cvs.openbsd.org>1996-08-14 22:03:18 +0000
committerdm <dm@cvs.openbsd.org>1996-08-14 22:03:18 +0000
commitba2295116662508fbd544e8dc42b33817906b496 (patch)
treebf942affc485daf76e605bcf5f43f075a91d94e4 /sys/arch/i386/include
parent8195fcf189f6ad6257cb2b14adfccbedc6046272 (diff)
Pentium Pro support
Diffstat (limited to 'sys/arch/i386/include')
-rw-r--r--sys/arch/i386/include/pctr.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/sys/arch/i386/include/pctr.h b/sys/arch/i386/include/pctr.h
index 6b7011a8c27..d86d4db116d 100644
--- a/sys/arch/i386/include/pctr.h
+++ b/sys/arch/i386/include/pctr.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pctr.h,v 1.2 1996/08/14 03:02:53 dm Exp $ */
+/* $OpenBSD: pctr.h,v 1.3 1996/08/14 22:03:16 dm Exp $ */
/*
* Pentium performance counter driver for OpenBSD.
@@ -35,6 +35,14 @@ struct pctrst {
#define P6CTR_EN 0x400000 /* Enable counters (counter 0 only) */
#define P6CTR_I 0x800000 /* Invert counter mask */
+/* Unit Mask bits */
+#define P6CTR_UM_M 0x0800 /* Modified cache lines */
+#define P6CTR_UM_E 0x0400 /* Exclusive cache lines */
+#define P6CTR_UM_S 0x0200 /* Shared cache lines */
+#define P6CTR_UM_I 0x0100 /* Invalid cache lines */
+#define P6CTR_UM_MESI (P6CTR_UM_M|P6CTR_UM_E|P6CTR_UM_S|P6CTR_UM_I)
+#define P6CTR_UM_A 0x2000 /* Any initiator (as opposed to self) */
+
/* ioctl to set which counter a device tracks. */
#define PCIOCRD _IOR('c', 1, struct pctrst) /* Read counter value */
#define PCIOCS0 _IOW('c', 8, unsigned int) /* Set counter 0 function */
@@ -115,7 +123,7 @@ struct pctrst {
})
#define wrmsr(msr, v) \
- __asm __volatile (".byte 0xf, 0x30" :: "A" (v), "c" (msr));
+ __asm __volatile (".byte 0xf, 0x30" :: "A" ((u_quad_t) (v)), "c" (msr));
#endif /* _KERNEL */
#endif /* ! _I386_PERFCNT_H_ */