summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKATO Takenori <kato@FreeBSD.org>1998-12-05 16:30:55 +0000
committerKATO Takenori <kato@FreeBSD.org>1998-12-05 16:30:55 +0000
commite697d57628fb9c32fb0c26e0ef81166a2d99fa8e (patch)
treed370af7ff49311b421017ff3cc33546011a490df
parentb956ca7ca474f3db02f6317507b2fcdc3f324655 (diff)
Notes
-rw-r--r--sys/amd64/amd64/identcpu.c21
-rw-r--r--sys/i386/i386/identcpu.c21
2 files changed, 40 insertions, 2 deletions
diff --git a/sys/amd64/amd64/identcpu.c b/sys/amd64/amd64/identcpu.c
index 98b9edf708d0..9b6d722b6182 100644
--- a/sys/amd64/amd64/identcpu.c
+++ b/sys/amd64/amd64/identcpu.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: Id: machdep.c,v 1.193 1996/06/18 01:22:04 bde Exp
- * $Id: identcpu.c,v 1.51 1998/07/11 07:45:28 bde Exp $
+ * $Id: identcpu.c,v 1.52 1998/10/06 13:16:23 kato Exp $
*/
#include "opt_cpu.h"
@@ -839,6 +839,7 @@ static void
print_AMD_info(void)
{
u_int regs[4];
+ quad_t amd_whcr;
do_cpuid(0x80000000, regs);
if (regs[0] >= 0x80000005) {
@@ -856,4 +857,22 @@ print_AMD_info(void)
printf(", %d lines/tag", (regs[3] >> 8) & 0xff);
print_AMD_assoc((regs[3] >> 16) & 0xff);
}
+ switch (cpu_id & 0xFF0) {
+ case 0x560: /* K6 0.35u */
+ case 0x570: /* K6 0.25u */
+ case 0x580: /* K6-2 */
+ case 0x590: /* K6-3 */
+ amd_whcr = rdmsr(0xc0000082);
+ if (!(amd_whcr & 0x00fe)) {
+ printf("Write Allocate Disable\n");
+ } else {
+ printf("Write Allocate Enable Limit: %dM bytes\n",
+ (u_int32_t)(amd_whcr & 0x00fe) * 2);
+ printf("Write Allocate 15-16M bytes: %s\n",
+ (amd_whcr & 0x0001) ? "Enable" : "Disable");
+ printf("Hardware Write Allocate Control: %s\n",
+ (amd_whcr & 0x0100) ? "Enable" : "Disable");
+ }
+ break;
+ }
}
diff --git a/sys/i386/i386/identcpu.c b/sys/i386/i386/identcpu.c
index 98b9edf708d0..9b6d722b6182 100644
--- a/sys/i386/i386/identcpu.c
+++ b/sys/i386/i386/identcpu.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: Id: machdep.c,v 1.193 1996/06/18 01:22:04 bde Exp
- * $Id: identcpu.c,v 1.51 1998/07/11 07:45:28 bde Exp $
+ * $Id: identcpu.c,v 1.52 1998/10/06 13:16:23 kato Exp $
*/
#include "opt_cpu.h"
@@ -839,6 +839,7 @@ static void
print_AMD_info(void)
{
u_int regs[4];
+ quad_t amd_whcr;
do_cpuid(0x80000000, regs);
if (regs[0] >= 0x80000005) {
@@ -856,4 +857,22 @@ print_AMD_info(void)
printf(", %d lines/tag", (regs[3] >> 8) & 0xff);
print_AMD_assoc((regs[3] >> 16) & 0xff);
}
+ switch (cpu_id & 0xFF0) {
+ case 0x560: /* K6 0.35u */
+ case 0x570: /* K6 0.25u */
+ case 0x580: /* K6-2 */
+ case 0x590: /* K6-3 */
+ amd_whcr = rdmsr(0xc0000082);
+ if (!(amd_whcr & 0x00fe)) {
+ printf("Write Allocate Disable\n");
+ } else {
+ printf("Write Allocate Enable Limit: %dM bytes\n",
+ (u_int32_t)(amd_whcr & 0x00fe) * 2);
+ printf("Write Allocate 15-16M bytes: %s\n",
+ (amd_whcr & 0x0001) ? "Enable" : "Disable");
+ printf("Hardware Write Allocate Control: %s\n",
+ (amd_whcr & 0x0100) ? "Enable" : "Disable");
+ }
+ break;
+ }
}