[Skiboot] [PATCH v6 09/11] Add POWER9 Cumulus processor PVR type
Vaidyanathan Srinivasan
svaidy at linux.ibm.com
Wed Aug 5 03:32:21 AEST 2020
From: Vaidyanathan Srinivasan <svaidy at linux.vnet.ibm.com>
Add PVR checks and feature mapping for POWER9 Cumulus chip.
Signed-off-by: Vaidyanathan Srinivasan <svaidy at linux.ibm.com>
Signed-off-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
---
core/cpufeatures.c | 19 +++++++++++++++++++
include/processor.h | 15 +++++++++++++++
2 files changed, 34 insertions(+)
diff --git a/core/cpufeatures.c b/core/cpufeatures.c
index f31850ab..2e33d8ad 100644
--- a/core/cpufeatures.c
+++ b/core/cpufeatures.c
@@ -942,6 +942,25 @@ void dt_add_cpufeatures(struct dt_node *root)
default:
assert(0);
}
+ } else if (is_power9c(version) &&
+ (PVR_VERS_MAJ(version) == 1)) {
+ /* P9C DD1.x */
+ switch (PVR_VERS_MIN(version)) {
+ case 1:
+ /* Cumulus DD1.1 => Nimbus DD2.1 */
+ cpu_feature_cpu = CPU_P9_DD2_0_1;
+ break;
+ case 2:
+ /* Cumulus DD1.2 */
+ cpu_feature_cpu = CPU_P9_DD2_2;
+ break;
+ case 3:
+ /* Cumulus DD1.3 */
+ cpu_feature_cpu = CPU_P9_DD2_3;
+ break;
+ default:
+ assert(0);
+ }
} else {
assert(0);
}
diff --git a/include/processor.h b/include/processor.h
index ddec6c04..70e749f1 100644
--- a/include/processor.h
+++ b/include/processor.h
@@ -248,6 +248,21 @@ static inline bool is_fused_core(uint32_t version)
}
}
+static inline bool is_power9c(uint32_t version)
+{
+
+ if (PVR_TYPE(version) != PVR_TYPE_P9)
+ return false;
+ /*
+ * Bit 13 tells us:
+ * 0 = Scale out (aka Nimbus)
+ * 1 = Scale up (aka Cumulus)
+ */
+ if (!((version >> 13) & 1))
+ return false;
+ return true;
+}
+
#ifndef __TEST__
/* POWER9 and above only */
--
2.26.2
More information about the Skiboot
mailing list