summaryrefslogtreecommitdiff
path: root/sys/arch/amd64
diff options
context:
space:
mode:
authorGordon Willem Klok <gwk@cvs.openbsd.org>2006-04-18 04:58:42 +0000
committerGordon Willem Klok <gwk@cvs.openbsd.org>2006-04-18 04:58:42 +0000
commite13c952f5b7c07c0bb64905e20b87fe72eb17d1a (patch)
tree8fd60002bf1a73c7f66ec45717de391759608fcf /sys/arch/amd64
parent6ab4353ad4434b1d5442c9c56fd85c69c7e24ba6 (diff)
Print a usefull diagnostic message if we fail to transition between states
like the K8 driver for i386. Fix some indentation. ok dlg@
Diffstat (limited to 'sys/arch/amd64')
-rw-r--r--sys/arch/amd64/amd64/powernow-k8.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/sys/arch/amd64/amd64/powernow-k8.c b/sys/arch/amd64/amd64/powernow-k8.c
index 207aa6d0138..1b33af371f3 100644
--- a/sys/arch/amd64/amd64/powernow-k8.c
+++ b/sys/arch/amd64/amd64/powernow-k8.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: powernow-k8.c,v 1.4 2006/03/16 02:39:57 dlg Exp $ */
+/* $OpenBSD: powernow-k8.c,v 1.5 2006/04/18 04:58:41 gwk Exp $ */
/*
* Copyright (c) 2004 Martin Végiard.
* All rights reserved.
@@ -63,8 +63,8 @@
#include <machine/cpufunc.h>
#include <machine/bus.h>
-#define BIOS_START 0xe0000
-#define BIOS_LEN 0x20000
+#define BIOS_START 0xe0000
+#define BIOS_LEN 0x20000
extern int cpuspeed;
@@ -280,8 +280,11 @@ k8_powernow_setperf(int level)
}
/* Check if transition failed. */
- if (cfid != fid || cvid != vid)
- return (1);
+ if (cfid != fid || cvid != vid) {
+ printf("%s transition to fid: %d vid: %d failed.", __func__,
+ fid, vid);
+ return (0);
+ }
cpuspeed = cstate->state_table[i].freq;
return (0);