aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/init.c4
-rw-r--r--include/processor.h16
2 files changed, 20 insertions, 0 deletions
diff --git a/core/init.c b/core/init.c
index 595d087..89240f6 100644
--- a/core/init.c
+++ b/core/init.c
@@ -1280,6 +1280,10 @@ void __noreturn __nomcount main_cpu_entry(const void *fdt)
/* Install the OPAL Console handlers */
init_opal_console();
+ if(is_fused_core(mfspr(SPR_PVR))) {
+ prerror("CPU: Detected unsupported fused core mode\n");
+ abort();
+ }
/*
* Some platforms set a flag to wait for SBE validation to be
* performed by the BMC. If this occurs it leaves the SBE in a
diff --git a/include/processor.h b/include/processor.h
index 57c2ee1..42002fc 100644
--- a/include/processor.h
+++ b/include/processor.h
@@ -173,10 +173,12 @@
/* PVR bits */
#define SPR_PVR_TYPE 0xffff0000
+#define SPR_PVR_CHIP_TYPE 0x0000f000
#define SPR_PVR_VERS_MAJ 0x00000f00
#define SPR_PVR_VERS_MIN 0x000000ff
#define PVR_TYPE(_pvr) GETFIELD(SPR_PVR_TYPE, _pvr)
+#define PVR_CHIP_TYPE(_pvr) GETFIELD(SPR_PVR_CHIP_TYPE, _pvr)
#define PVR_VERS_MAJ(_pvr) GETFIELD(SPR_PVR_VERS_MAJ, _pvr)
#define PVR_VERS_MIN(_pvr) GETFIELD(SPR_PVR_VERS_MIN, _pvr)
@@ -228,6 +230,20 @@ static inline bool is_power9n(uint32_t version)
return true;
}
+static inline bool is_fused_core(uint32_t version)
+{
+ if (PVR_TYPE(version) != PVR_TYPE_P9)
+ return false;
+
+ switch(PVR_CHIP_TYPE(version)) {
+ case 0:
+ case 2:
+ return true;
+ default:
+ return false;
+ }
+}
+
#ifndef __TEST__
/*