summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2006-03-16 02:35:09 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2006-03-16 02:35:09 +0000
commitfe91240cccde044df3c10e9f1b785c09dcf49898 (patch)
treeb8b3404781fda28526a2a9f6299f2b6688adb36f
parent1ef57375f0170e1f2bda8e7803a21b61d8e927f7 (diff)
display the possible speedstep values like we do on intel chips.
from gwk, ok deraadt@
-rw-r--r--sys/arch/amd64/amd64/powernow-k8.c15
-rw-r--r--sys/arch/i386/i386/powernow-k8.c15
2 files changed, 14 insertions, 16 deletions
diff --git a/sys/arch/amd64/amd64/powernow-k8.c b/sys/arch/amd64/amd64/powernow-k8.c
index f457c322ffc..e233f6630d5 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.2 2006/03/15 19:56:00 deraadt Exp $ */
+/* $OpenBSD: powernow-k8.c,v 1.3 2006/03/16 02:35:08 dlg Exp $ */
/*
* Copyright (c) 2004 Martin Végiard.
* All rights reserved.
@@ -392,14 +392,13 @@ k8_powernow_init(void)
if (k8pnow_states(cstate, ci->ci_signature, maxfid, maxvid)) {
if (cstate->n_states) {
- printf("%s: AMD %s available states ",
- ci->ci_dev->dv_xname, techname);
- for(i= 0; i < cstate->n_states; i++) {
- state = &cstate->state_table[i];
- printf("%c%d", i==0 ? '(' : ',',
- state->freq);
+ printf("%s: %s %d Mhz: speeds:",
+ ci->ci_dev->dv_xname, techname, cpuspeed);
+ for(i = cstate->n_states; i > 0; i--) {
+ state = &cstate->state_table[i-1];
+ printf(" %d", state->freq);
}
- printf(")\n");
+ printf(" Mhz\n");
k8pnow_current_state = cstate;
cpu_setperf = k8_powernow_setperf;
}
diff --git a/sys/arch/i386/i386/powernow-k8.c b/sys/arch/i386/i386/powernow-k8.c
index a8d4ed0acb8..5a8e0367bfa 100644
--- a/sys/arch/i386/i386/powernow-k8.c
+++ b/sys/arch/i386/i386/powernow-k8.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: powernow-k8.c,v 1.5 2006/03/15 19:56:48 deraadt Exp $ */
+/* $OpenBSD: powernow-k8.c,v 1.6 2006/03/16 02:35:08 dlg Exp $ */
/*
* Copyright (c) 2004 Martin Végiard.
@@ -394,14 +394,13 @@ k8_powernow_init(void)
if (k8pnow_states(cstate, ci->ci_signature, maxfid, maxvid)) {
if (cstate->n_states) {
- printf("%s: AMD %s available states ",
- ci->ci_dev.dv_xname, techname);
- for (i= 0; i < cstate->n_states; i++) {
- state = &cstate->state_table[i];
- printf("%c%d", i==0 ? '(' : ',',
- state->freq);
+ printf("%s: %s %d Mhz: speeds:",
+ ci->ci_dev.dv_xname, techname, pentium_mhz);
+ for (i = cstate->n_states; i > 0; i--) {
+ state = &cstate->state_table[i-1];
+ printf(" %d", state->freq);
}
- printf(")\n");
+ printf(" Mhz\n");
k8pnow_current_state = cstate;
cpu_setperf = k8_powernow_setperf;
}