aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorStewart Smith <stewart@flamingspork.com>2021-12-20 22:22:46 +1000
committerCédric Le Goater <clg@kaod.org>2022-01-03 16:12:45 +0100
commita6816a42c1f40481c998177b2b88329984ed25b2 (patch)
treea16e18b13ebec97cd8f1704b26d439f6d4da7a31 /core
parentb2b4b311c4a2a084bb072eeaf8d9e0409a9eedd5 (diff)
downloadskiboot-a6816a42c1f40481c998177b2b88329984ed25b2.zip
skiboot-a6816a42c1f40481c998177b2b88329984ed25b2.tar.gz
skiboot-a6816a42c1f40481c998177b2b88329984ed25b2.tar.bz2
Add CONFIG_P8 with PHB3 behind it
We can use a base CPU of POWER9 if we don't have P8. We can also hide PHB3 code behind this, and shave 12kb off skiboot.lid.xz Reviewed-by: Dan Horák <dan@danny.cz> [npiggin: add cpp define, fail gracefully on P8] Signed-off-by: Stewart Smith <stewart@flamingspork.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
Diffstat (limited to 'core')
-rw-r--r--core/cpu.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/core/cpu.c b/core/cpu.c
index 6756ab1..f0be580 100644
--- a/core/cpu.c
+++ b/core/cpu.c
@@ -1066,9 +1066,16 @@ void init_boot_cpu(void)
cpu_thread_count = 1;
}
- if (proc_gen == proc_gen_p8 && (PVR_VERS_MAJ(mfspr(SPR_PVR)) == 1)) {
- prerror("CPU: POWER8 DD1 is not supported\n");
+ if (proc_gen == proc_gen_p8) {
+#ifdef CONFIG_P8
+ if (PVR_VERS_MAJ(mfspr(SPR_PVR)) == 1) {
+ prerror("CPU: POWER8 DD1 is not supported\n");
+ abort();
+ }
+#else
+ prerror("CPU: POWER8 detected but CONFIG_P8 not set\n");
abort();
+#endif
}
if (is_power9n(pvr) && (PVR_VERS_MAJ(pvr) == 1)) {