summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Herrmann <andreas.herrmann3@amd.com>2011-11-15 11:44:57 +0100
committerDave Jones <davej@redhat.com>2011-11-29 10:02:07 -0500
commita784fcb361622af41ca8761f5f1e1e783706cba4 (patch)
tree6c704d3e2572eecbfabd19b7d71d7fe11bc230a3
parent70bb10a5296a3461e79479fec2aa3cd9d6785635 (diff)
x86info: Add support for AMD CPU family 15h
Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
-rw-r--r--AMD/identify.c24
-rw-r--r--AMD/powernow.c8
-rw-r--r--AMD/revision.h6
-rw-r--r--features.c4
4 files changed, 33 insertions, 9 deletions
diff --git a/AMD/identify.c b/AMD/identify.c
index d88fac2..a80793e 100644
--- a/AMD/identify.c
+++ b/AMD/identify.c
@@ -91,7 +91,7 @@ static void set_connector(struct cpudata *c)
cpuid(c->number, 0x80000001, &eax, &ebx, &ecx, &edx);
pkg_id = (ebx >> 28) & 0xf;
- if ((family(c) == 0x10) || (family(c) == 0x11)) {
+ if ((family(c) == 0x10) || (family(c) == 0x11) || (family(c) == 0x15)) {
switch (pkg_id) {
case 0:
c->connector = CONN_SOCKET_F_R2;
@@ -110,6 +110,7 @@ static void set_connector(struct cpudata *c)
break;
case 5:
c->connector = CONN_SOCKET_C32;
+ break;
default:
c->connector = 0;
}
@@ -196,6 +197,20 @@ static void set_fam14h_revinfo(int id, struct cpudata *c)
set_connector(c);
}
+static void set_fam15h_revinfo(int id, struct cpudata *c)
+{
+ const char *p;
+
+ p = get_fam15h_revision_name(id);
+ if (p)
+ snprintf(c->name, CPU_NAME_LEN,
+ "AMD FX Series Processor (%s)", p);
+ else
+ snprintf(c->name, CPU_NAME_LEN, "Unknown CPU");
+ set_connector(c);
+}
+
+
static void do_assoc(unsigned long assoc)
{
switch (assoc & 0xff) {
@@ -347,12 +362,12 @@ void decode_AMD_cacheinfo(struct cpudata *cpu)
printf("\n\t");
printf("lines per tag=%u\t", (ecx >> 8) & 0x0f);
printf("line size=%u bytes.\n", ecx & 0xff);
- if (family(cpu) == 0x10) {
+ if ((family(cpu) == 0x10) || (family(cpu) == 0x15)) {
printf("L3 (shared) cache:\n\t");
if (!(edx >> 18))
printf("none/disabled\n");
else {
- /* family 0x10 has shared L3 cache */
+ /* shared L3 cache */
printf("Size: %uKb\t",
(edx >> 18) * 512);
do_l2assoc((edx >> 12) & 0x0f);
@@ -448,6 +463,9 @@ void Identify_AMD(struct cpudata *cpu)
case 0x14:
set_fam14h_revinfo(eax, cpu);
break;
+ case 0x15:
+ set_fam15h_revinfo(eax, cpu);
+ break;
default:
printf("Unknown CPU family: 0x%x\n",
family(cpu));
diff --git a/AMD/powernow.c b/AMD/powernow.c
index 8a26f75..4ce2b89 100644
--- a/AMD/powernow.c
+++ b/AMD/powernow.c
@@ -168,7 +168,7 @@ static int get_cof(int family, union msr_pstate pstate)
t = 0x10;
fid = pstate.bits.fid;
- if (family == 0x10)
+ if ((family == 0x10) || (family == 0x15))
goto out;
if (family == 0x11) {
@@ -190,7 +190,7 @@ static int get_cof(int family, union msr_pstate pstate)
did = 2; goto out;
case 6:
did = 3; goto out;
- case 8:
+ case 8:
did = 4; goto out;
case 1:
f = 2; d = 3; break;
@@ -218,7 +218,7 @@ static int get_cof(int family, union msr_pstate pstate)
static int get_num_boost_states(void)
{
struct pci_filter filter_nb_link = { -1, -1, -1, -1, 0x1022, 0};
- int dev_ids[3] = {0x1204, 0x1704};
+ int dev_ids[3] = {0x1204, 0x1604, 0x1704};
struct pci_access *pacc;
struct pci_dev *z = NULL;
u8 val;
@@ -244,7 +244,7 @@ static int get_num_boost_states(void)
printf("Boosting enabled\n");
else
printf("Boosting disabled\n");
- val = (val >> 2) & 1;
+ val = (val >> 2) & 7;
printf("Number of boost states: %d\n", val);
}
diff --git a/AMD/revision.h b/AMD/revision.h
index e3568f7..61dc732 100644
--- a/AMD/revision.h
+++ b/AMD/revision.h
@@ -157,4 +157,10 @@ struct id_string fam14h_revisions[] = {
};
get_name(fam14h_revision, int, fam14h_revisions);
+struct id_string fam15h_revisions[] = {
+
+ {0x00600f12, "OR-B2"},
+};
+get_name(fam15h_revision, int, fam15h_revisions);
+
#endif /* _amd_revision_h_ */
diff --git a/features.c b/features.c
index c02cf86..548b958 100644
--- a/features.c
+++ b/features.c
@@ -372,8 +372,8 @@ static void decode_feature_flags(struct cpudata *cpu)
"3dnowPref", "osvw", "ibs", "xop",
"skinit", "wdt", NULL, "lwp",
"fma4", NULL, NULL, "NodeId",
- NULL, "tbm", "TopoExt", NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
+ NULL, "tbm", "TopoExt", "PerfCtrExtCore",
+ "PerfCtrExtNB", NULL, NULL, NULL, NULL, NULL, NULL, NULL
};
const char *centaur_cap_extended_ecx_flags[] = {